struct subsystem {
struct kset kset;
struct rw_semaphore rwsem;
};
struct kobject {
char * k_name;
char name[KOBJ_NAME_LEN];
atomic_t refcount;
struct list_head entry;
struct kobject * parent;
struct kset * kset;
struct kobj_type * ktype;
struct dentry * dentry;
};
struct kobj_type {
void (*release)(struct kobject *); /* wskaznik na funkcję wywoływaną, kiedy urządzenie jest usuwane - licznik count=0 */
struct sysfs_ops * sysfs_ops; /* te pola kontrolują reprezentację obiektu w sysfs */
struct attribute ** default_attrs;
};
struct cdev {
struct kobject kobj;
struct module *owner;
struct file_operations *ops;
struct list_head list;
};
struct kobject * parent; /* jesli ustawimy na null, to podczas dodawania do kset zostanie to pole zmienione, na główny kobject dla danego kset'u */
struct kset * kset; /* kset, do ktorego należy urządzenie */
struct kobj_type * ktype;
struct dentry * dentry;
/sys
|-- block
| |-- fd0
| | |-- dev
| | |-- iosched
| | | |-- fifo_batch
| | | |-- front_merges
| | | |-- read_expire
| | | |-- write_expire
| | | `-- writes_starved
| | |-- range
| | |-- size
| | `-- stat
| `-- hda
| |-- dev
| |-- device -> ../../devices/pci0/00:11.1/ide0/0.0
| |-- hda1
| | |-- dev
| | |-- size
| | |-- start
| | `-- stat
| |-- hda2
| | |-- dev
| | |-- size
| | |-- start
| | `-- stat
| |-- hda3
| | |-- dev
| | |-- size
| | |-- start
| | `-- stat
| |-- iosched
| | |-- fifo_batch
| | |-- front_merges
| | |-- read_expire
| | |-- write_expire
| | `-- writes_starved
| |-- range
| |-- size
| `-- stat
|-- bus
| |-- ide
| | |-- devices
| | | |-- 0.0 -> ../../../devices/pci0/00:11.1/ide0/0.0
| | | `-- 1.0 -> ../../../devices/pci0/00:11.1/ide1/1.0
| | `-- drivers
| | `-- ide-disk
| |-- pci
| | |-- devices
| | | |-- 00:00.0 -> ../../../devices/pci0/00:00.0
| | | |-- 00:01.0 -> ../../../devices/pci0/00:01.0
| | | |-- 00:05.0 -> ../../../devices/pci0/00:05.0
| | | |-- 00:09.0 -> ../../../devices/pci0/00:09.0
| | | |-- 00:09.1 -> ../../../devices/pci0/00:09.1
| | | |-- 00:09.2 -> ../../../devices/pci0/00:09.2
| | | |-- 00:0c.0 -> ../../../devices/pci0/00:0c.0
| | | |-- 00:11.0 -> ../../../devices/pci0/00:11.0
| | | |-- 00:11.1 -> ../../../devices/pci0/00:11.1
| | | |-- 00:11.2 -> ../../../devices/pci0/00:11.2
| | | |-- 00:11.3 -> ../../../devices/pci0/00:11.3
| | | `-- 01:00.0 -> ../../../devices/pci0/00:01.0/01:00.0
| | `-- drivers
| | |-- AEC62xx IDE
| | |-- ALI15x3 IDE
| | |-- AMD IDE
| | |-- CMD64x IDE
| | |-- Cypress IDE
| | |-- HPT34x IDE
| | |-- HPT366 IDE
| | |-- PIIX IDE
| | |-- RZ1000 IDE
| | |-- SIS IDE
| | |-- SLC90e66 IDE
| | |-- Serverworks IDE
| | |-- VIA IDE
| | | `-- 00:11.1 -> ../../../../devices/pci0/00:11.1
| | |-- eepro100
| | | `-- 00:0c.0 -> ../../../../devices/pci0/00:0c.0
| | `-- parport_pc
| |-- platform
| | |-- devices
| | | `-- floppy0 -> ../../../devices/legacy/floppy0
| | `-- drivers
| |-- pnp
| | |-- devices
| | `-- drivers
| | |-- parport_pc
| | `-- system
| |-- system
| | |-- devices
| | | |-- cpu0 -> ../../../devices/sys/cpu0
| | | |-- pic0 -> ../../../devices/sys/pic0
| | | |-- rtc0 -> ../../../devices/sys/rtc0
| | | `-- timer0 -> ../../../devices/sys/timer0
| | `-- drivers
| | |-- cpu
| | | `-- cpu0 -> ../../../../devices/sys/cpu0
| | |-- pic
| | | `-- pic0 -> ../../../../devices/sys/pic0
| | `-- timer
| | `-- timer0 -> ../../../../devices/sys/timer0
| `-- usb
| |-- devices
| `-- drivers
| |-- hub
| |-- usb
| `-- usbfs
|-- class
| |-- cpu
| | `-- cpu0
| | `-- device -> ../../../devices/sys/cpu0
| |-- input
| `-- tty
|-- devices
| |-- legacy
| | |-- floppy0
| | | |-- name
| | | `-- power
| | |-- name
| | `-- power
| |-- pci0
| | |-- 00:00.0
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:01.0
| | | |-- 01:00.0
| | | | |-- class
| | | | |-- device
| | | | |-- irq
| | | | |-- name
| | | | |-- power
| | | | |-- resource
| | | | |-- subsystem_device
| | | | |-- subsystem_vendor
| | | | `-- vendor
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:05.0
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:09.0
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:09.1
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:09.2
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:0c.0
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:11.0
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:11.1
| | | |-- class
| | | |-- device
| | | |-- ide0
| | | | |-- 0.0
| | | | | |-- block -> ../../../../../block/hda
| | | | | |-- name
| | | | | `-- power
| | | | |-- name
| | | | `-- power
| | | |-- ide1
| | | | |-- 1.0
| | | | | |-- name
| | | | | `-- power
| | | | |-- name
| | | | `-- power
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:11.2
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- 00:11.3
| | | |-- class
| | | |-- device
| | | |-- irq
| | | |-- name
| | | |-- power
| | | |-- resource
| | | |-- subsystem_device
| | | |-- subsystem_vendor
| | | `-- vendor
| | |-- name
| | `-- power
| `-- sys
| |-- cpu0
| | |-- name
| | `-- power
| |-- name
| |-- pic0
| | |-- name
| | `-- power
| |-- power
| |-- rtc0
| | |-- name
| | `-- power
| `-- timer0
| |-- name
| `-- power
|-- firmware
| `-- acpi
| `-- namespace
| `-- ACPI
| |-- CPU0
| |-- PWRF
| `-- _SB
| |-- LNKA
| |-- LNKB
| |-- LNKC
| |-- LNKD
| |-- LNKE
| |-- MEM1
| |-- PCI0
| | |-- IDE0
| | | |-- CHN0
| | | | |-- DRV0
| | | | `-- DRV1
| | | `-- CHN1
| | | |-- DRV0
| | | `-- DRV1
| | |-- PCI1
| | |-- PX40
| | | |-- COPR
| | | |-- DMA1
| | | |-- ECP
| | | |-- FDC0
| | | |-- IRDA
| | | |-- LPT
| | | |-- MSRD
| | | |-- PIC
| | | |-- PS2K
| | | |-- PS2M
| | | |-- PSMR
| | | |-- RTC
| | | |-- SBIO
| | | |-- SDRD
| | | |-- SPKR
| | | |-- SYS1
| | | |-- SYS2
| | | |-- SYS3
| | | |-- TMR
| | | |-- UAR1
| | | `-- UAR2
| | |-- USB0
| | `-- USB1
| `-- PWRB
|-- fs
| |-- autofs
| |-- bdev
| |-- binfmt_misc
| |-- devpts
| |-- eventpollfs
| |-- ext2
| |-- ext3
| |-- futexfs
| |-- iso9660
| |-- nfs
| |-- nfs4
| |-- nfsd
| |-- pipefs
| |-- proc
| |-- ramfs
| |-- rootfs
| |-- rpc_pipefs
| |-- sockfs
| |-- sysfs
| |-- tmpfs
| |-- usbdevfs
| `-- usbfs
`-- net
`-- eth0
kernel: hub.c: new USB device 00:1d.0-1, assigned address 2
kernel: usb.c: USB device 2 (vend/prod 0x90a/0x1001) is not claimed by any acti
# $(cat /proc/sys/kernel/hotplug) usb
for I in "${DIR}/$1/"*.hotplug "${DIR}/"default/*.hotplug ; do
if [ -f $I ]; then
test -x $I && $I $1 ;
fi
done
DEVFS=/proc/bus/usb OLDPWD=/ PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTION=add
PWD=/etc/hotplug HOME=/ SHLVL=2 DEVICE=/proc/bus/usb/001/002
INTERFACE=8/6/80 PRODUCT=90a/1001/100 TYPE=0/0/0 DEBUG=yes _=/bin/env