Bug 142023

Summary: /proc/bus/usb in udev environment
Product: [openSUSE] SUSE Linux 10.1 Reporter: Ludwig Nussel <lnussel>
Component: BasesystemAssignee: Kay Sievers <kasievers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: asn
Version: Alpha 4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ludwig Nussel 2006-01-09 12:27:26 UTC
When running a script in response to an udev usb add event the environment contains DEVICE=/proc/bus/usb/..., I guess it should be /dev/bus/usb/... now.
Comment 1 Kay Sievers 2006-01-09 12:40:43 UTC
No, that's a kernel added value. It was stupid in the first place to have /proc included and it should not longer be used. If usbfs is not configured in the kernel, which is the long-term goal, it will just go away.
Comment 2 Ludwig Nussel 2006-01-09 12:47:06 UTC
I use this property to find bus and device number so I can pass them to lomoco (new package, just submitted). How do I determine the numbers without $DEVICE?
Comment 3 Kay Sievers 2006-01-09 13:19:36 UTC
If you need to talk to the device node, it would be better to catch the:
  $udevmonitor --env
  ...
  UDEV  [1136812331.052205] add@/class/usb_device/usbdev3.5
  SUBSYSTEM=usb_device
  DEVNAME=/dev/bus/usb/003/005
  ...

event, cause then you can be sure the node it created at that time. The values are the numbers in the device name: usbdev<BUS>.<DEVICE>. Udev does get the numbers from there too.

If you need to match on the device with the DEVICE value, we may need to add USBBUS, USBDEVICE to the kernel.
Comment 4 Ludwig Nussel 2006-01-09 13:29:30 UTC
Ok, thanks. I'll switch to this event type when I can test it with an actually supported mouse (don't have one here atm).
Comment 5 Kay Sievers 2006-01-09 13:35:57 UTC
Great, let me know how it works, or just close the bug if it's fine. I set it to NEEDINFO for this. Thanks!
Comment 6 Ludwig Nussel 2006-01-10 16:31:12 UTC
works