./eeze_udev_test
For my first trick, I will find all of your keyboards and return their syspaths.
Found keyboard:
/sys/devices/pci0000:00/0000:00:13.1/usb6/6-2/6-2:1.1/input/input8/event6
Found keyboard:
/sys/devices/pci0000:00/0000:00:13.1/usb6/6-2/6-2:1.1/input/input8/mouse1
Found keyboard:
/sys/devices/pci0000:00/0000:00:13.1/usb6/6-3/6-3:1.0/input/input5/event2

Next, I will find all of your mice and print the corresponding manufacturer.
Found mouse 
/sys/devices/pci0000:00/0000:00:13.1/usb6/6-2/6-2:1.0/input/input7/event5
with vendor: Areson
Found mouse 
/sys/devices/pci0000:00/0000:00:13.1/usb6/6-2/6-2:1.0/input/input7/mouse0
with vendor: Areson
Found mouse 
/sys/devices/pci0000:00/0000:00:13.1/usb6/6-2/6-2:1.1/input/input8/event6
with vendor: Areson
Found mouse 
/sys/devices/pci0000:00/0000:00:13.1/usb6/6-2/6-2:1.1/input/input8/mouse1
with vendor: Areson

Now let's try something a little more difficult.  Mountable filesystems!
Found device: 
/sys/devices/pci0000:00/0000:00:11.0/host1/target1:0:0/1:0:0:0/block/sda/sda1
        You probably know it better as /dev/sda1
        It's formatted as ext4!
Found device: 
/sys/devices/pci0000:00/0000:00:11.0/host2/target2:0:0/2:0:0:0/block/sdb/sdb1
        You probably know it better as /dev/sdb1
        It's formatted as btrfs!

Network devices!
Found device: /sys/devices/pci0000:00/0000:00:09.0/0000:03:00.0/net/eth0
        You probably know it better as eth0
Found device: /sys/devices/pci0000:00/0000:00:0a.0/0000:04:00.0/net/eth1
        You probably know it better as eth1
Found device: /sys/devices/virtual/net/lo
        You probably know it better as lo

Internal drives, anyone?  With serial numbers?
/sys/devices/pci0000:00/0000:00:11.0/host1/target1:0:0/1:0:0:0/block/sda:
OCZ_VERTEX-LE_f40404040
/sys/devices/pci0000:00/0000:00:11.0/host2/target2:0:0/2:0:0:0/block/sdb:
SAMSUNG_HD401LJ_S0HVJ5AT123456

Got any removables?  I'm gonna find em!
        Ooh, a Flash HS-CF      attached to the scsi subsytem!
        Ooh, a Flash HS-COMBO   attached to the scsi subsytem!

And now for something more complicated.  Plug or unplug your keyboard
or mouse for me.
Sneaky sneaky!  But
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-4/2-4.1/2-4.1.3 is not a
keyboard or a mouse!!
Sneaky sneaky!  But
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-4/2-4.1/2-4.1.3/2-4.1.3:1.0
is not a keyboard or a mouse!!
Sneaky sneaky!  But
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-4/2-4.1/2-4.1.3/2-4.1.3.1
is not a keyboard or a mouse!!
Sneaky sneaky!  But
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-4/2-4.1/2-4.1.3/2-4.1.3.1/2-4.1.3.1:1.0
is not a keyboard or a mouse!!
Sneaky sneaky!  But
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-4/2-4.1/2-4.1.3/2-4.1.3.1/2-4.1.3.1:1.0/0003:04FE:0006.0008
is not a keyboard or a mouse!!
Sneaky sneaky!  But
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-4/2-4.1/2-4.1.3/2-4.1.3.1/2-4.1.3.1:1.0/0003:04FE:0006.0008/hidraw/hidraw2
is not a keyboard or a mouse!!
Sneaky sneaky!  But
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-4/2-4.1/2-4.1.3/2-4.1.3.1/2-4.1.3.1:1.0/input/input9
is not a keyboard or a mouse!!
You plugged in /dev/input/event4!
All tests completed, exiting successfully!

--------------
I'm not that sneaky, it really is a keyboard :)

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to