
libhardware
======================
@2000 by Antonio Gallo <agx@linux.it>
http://www.badpenguin.org



What is libhardware ?
=====================
libhardware is a simple library to access information on your system thru'
the /proc filessytem or to autodetect them

libhardware is based upon the TComputer structure that you can dinamically
allocate using the 'create_computer()' function, this just allocate an
empty structure that you can populate with the information you require.



Where to get it
===============
libhardware is distributed as source code, its bundled into the pkgtools
package that can be found on www.badpenguin.org or www.linux.it/~agx/



Structure
=========

TComputer     - a simple structure that hold pointers to all the other objects
+- eide       - a TChain that contains a TBlockDevice for each EIDE device
+- scsi       - a TChain that contains a TBlockDevice for each SCSI device
+- partitions - a TChain that contains all the TPartitions attached to each
                EIDE or SCSI device of type TBlockDevice



Functions
=========

query_eide_devices      - populate the list of EIDE devices (eide) without
                          probing the partitions list
query_scsi_devices      - populate the list of SCSI devices (scsi) without
                          probing the partitions list
query_partitions        - populate the list of each partitions (partitions)
                          EIDE and SCSI present also filling the partition
		          field of each block device (eide,scsi)
query_partitions_device - populate the list of the partitions attached to
                          a specific device EIDE (eide) or SCSI (scsi)


			  
====================== SOME IDEAS & TO BE DONE ===========================
   +-- System
       /proc/ version uptime loadavg
   +-- CPU
       /proc/cpuinfo
   +-- RAM
       /proc/meminfo
   +-- Motherboard
       /proc/ dma interrupts ioports
   +-- CMOS Clock
       /proc/rtc
   +-- BIOS
   +-- Floppy Contr. -- Floppy Disks
       dmesg | "Floppy drive(s): fd0 is 1.4M"
       dmesg | "FDC 0 is a National Semiconductor PC87306"
   +-- Soundcards
       /proc/sound
   +-- Network Cards
   +-- Serial Ports
       /proc/tty/driver/serial (uart != unknown)
       +-- Mices
       +-- Modems
   +-- Parallel Ports
       /proc/parport/.../ autoprobe devices hardware irq
       +-- Printers
       +-- PLIPs
   +-- PS/2
       dmesg | "Detected PS/2 Mouse Port."
       experimenting with nvram ?
   +-- APM
       /proc/apm
