Skip to contentSkip to conversation

libsysfs v0.1.0

ANNOUNCE Daniel Stekloff 3 participants 3 messages Jul 7, 2003

lore
Share & tools
lore
#0 lore raw

I'd like to announce libsysfs - a small library built over sysfs, the virtual filesystem that exports system devices in the Linux 2.5+ kernels. You can find the initial version of the library in a small package called sysutils at:

kernel.org/pub/linux/utils/kernel/hotplug/sysutils-0.1.0.tar.gz

The library grew from the requirements of several applications all needing access to system device information in sysfs. We felt it was better to provide a library of common code rather than having each application create their own access. Greg KH's udev application, a User Space replacement for devfs, is one of the applications needing sysfs access. You can see Greg's original announcement here:

	http://marc.theaimsgroup.com/?l=linux-kernel&m=105003185331553&w=2

The library doesn't implement any device or bus specifics but simply provides generic bus, class, and device access as represented in sysfs. Included with the library in the sysutils package are two small commands that hopefully make viewing sysfs and system device information easier.

- systool is a command that can list devices by bus, by class, or by device root - as represented through sysfs. Here's example output showing all devices off root device pci2, children are indented following each device:

[stekloff@... stekloff]$ systool -r pci2
Root Device Tree: pci2
pci2 Host/PCI Bridge

         02:01.1 Adaptec AIC-7899P U160/m (#2)
               host1 aic7xxx
                     1:0:8:0 SCSI Processor
                           1:0:8:0:gen SCSI Processorgeneric
                     1:0:0:0 SCSI Direct-Access
                           1:0:0:0:gen SCSI Direct-Accessgeneric
         02:01.0 Adaptec AIC-7899P U160/m
               host0 aic7xxx

- lsbus is a small command for simply viewing sysfs bus information. Here's example output showing all PCI drivers and their devices:

[stekloff@... stekloff]$ lsbus -D pci
Bus: pci
Drivers:
aic7xxx

        Devices:
                02:01.0
                02:01.1
  RZ1000 IDE
  PIIX IDE
  eepro100
  pcnet32
        Devices:
                00:05.0

serial
agpgart-via
agpgart-sis
agpgart-intel
agpgart-amdk7
agpgart-ali

All comments, suggestions, and contributions are welcome.

Thanks,

Dan

#1 lore raw
Quoted 6 lines · Daniel Stekloff

I'd like to announce libsysfs - a small library built over sysfs, the virtual filesystem that exports system devices in the Linux 2.5+ kernels. You can find the initial version of the library in a small package called sysutils at:

kernel.org/pub/linux/utils/kernel/hotplug/sysutils-0.1.0.tar.gz

No permission to read it...

Signature · 4 lines
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513
#2 lore raw
Quoted 10 lines · Horst von Brand
Quoted 6 lines · Daniel Stekloff

I'd like to announce libsysfs - a small library built over sysfs, the virtual filesystem that exports system devices in the Linux 2.5+ kernels. You can find the initial version of the library in a small package called sysutils at:

kernel.org/pub/linux/utils/kernel/hotplug/sysutils-0.1.0.tar.gz

No permission to read it...

Oops, my fault. Hopefully the permission change will propagate outward properly...

greg k-h