summaryrefslogtreecommitdiff
path: root/extras/usb_id/usb_id.c
AgeCommit message (Collapse)Author
2010-03-17libudev: add udev_device_new_from_environment()Kay Sievers
2009-06-09move syslog wrapper to libudevKay Sievers
2009-05-20use more efficient string copyingKay Sievers
2009-03-28usb_id: remove unused variableKay Sievers
2009-03-25usb_id: add ID_VENDOR_ID, ID_MODEL_ID, ID_USB_INTERFACE_NUM, ID_USB_DRIVERKay Sievers
$ extras/usb_id/usb_id -x /class/tty/ttyUSB1 ID_VENDOR=HUAWEI_Technology ID_VENDOR_ENC=HUAWEI\x20Technology ID_VENDOR_ID=12d1 ID_MODEL=HUAWEI_Mobile ID_MODEL_ENC=HUAWEI\x20Mobile ID_MODEL_ID=1003 ID_REVISION=0000 ID_SERIAL=HUAWEI_Technology_HUAWEI_Mobile ID_TYPE=generic ID_BUS=usb ID_USB_INTERFACES=:ffffff:080650: ID_USB_INTERFACE_NUM=01 ID_USB_DRIVER=option
2009-02-26usb_id: fix commentKay Sievers
2009-02-26usb_id: fix NULL string usageKay Sievers
2009-02-26usb_id: return values if called directly for an usb_deviceKay Sievers
2009-02-26usb_id: add ID_USB_INTERFACES=:0e0100:0e0200:010100:010200:Kay Sievers
2009-02-17*_id: add model/vendor enc stringsDavid Zeuthen
So ID_MODEL and ID_VENDOR are pretty useful keys. However since we fix them up (removing leading/trailing whitespace, converts spaces to underscores) for use in device naming etc. we also force these fixups on the desktop shell. And this looks pretty ugly. The attached patch introduces the ID_MODEL_ENC and ID_VENDOR_ENC keys that contains the encoded version of the raw strings obtained. It's pretty similar in spirit to ID_FS_LABEL and its cousin ID_FS_LABEL_ENC. With this patch a desktop shell can fix up these strings as it sees fit. Note that some fixup is still needed though, for example # /lib/udev/ata_id --export /dev/sda |grep ID_MODEL ID_MODEL=INTEL_SSDSA2MH080G1GC ID_MODEL_ENC=INTEL\x20SSDSA2MH080G1GC\x20\x20\x20\x20\x20\x20\x20\x20 \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 Note the trailing and leading whitespace. Anyway with the attached patch the desktop shell should be able to display "INTEL SSDSA2MH080G1GC" rather than "INTEL_SSDSA2MH080G1GC" to the user.
2009-01-22usb_id: handle ATAPI devices like SCSI devicesKay Sievers
Some weird mass storage devices identify the disks as ATAPI/cdrom devices, and all disks in such enclusure get the same ids which overwrite each other, in such cases, get the typ of device from the scsi device, which has more knowledge what kind of device it really is.
2009-01-06extras: fix mis-spelling of "environment"Adam Buchbinder
2009-01-05usb_id: s/image/media/Kay Sievers
2009-01-03usb_id: use devtype lookupKay Sievers
2009-01-03libudev: device - remove udev_device_get_parent_with_subsystemMarcel Holtmann
2008-12-29usb_id: add "image" classKay Sievers
2008-11-26usb_id: add "break" to currently unused case labelsKay Sievers
2008-11-26usb_id: fix switch statement for video typeMarcel Holtmann
Introducing the video type, creating a fall-through case where other devices might now be declared as type video.
2008-11-20usb_id: replace chars in returned stringsKay Sievers
Slashes are not funny in device names: |-- input | |-- by-id | | `-- usb-Logitech_USB-PS | | |-- 2_Optical_Mouse-event-mouse -> ../../event2 | | `-- 2_Optical_Mouse-mouse -> ../../mouse1
2008-11-20rules: v4l - add by-id/ links for USB devicesKay Sievers
/dev/v4l |-- by-id | |-- usb-046d_09a4_C4B15020-video-index0 -> ../../video0 | `-- usb-05a9_a511-video-index0 -> ../../video1 `-- by-path |-- pci-0000:00:1d.0-usb-0:1:1.0-video-index0 -> ../../video1 `-- pci-0000:00:1d.7-usb-0:2:1.0-video-index0 -> ../../video0
2008-11-05unify string replacementKay Sievers
2008-11-05usb_id: MassStorage SubClass 6 is "scsi" not "disk"Kay Sievers
2008-10-24fix uninitialized variable warningsKay Sievers
2008-10-20libudev: device - get_attr_value() -> get_sysattr_value()Kay Sievers
2008-10-02usb_id: use libudevKay Sievers
2008-10-02use no_argument, required_argument, optional_argument in longoptsKay Sievers
2008-09-29fix dbg() callersKay Sievers
2008-09-19always include config.h from MakefileKay Sievers
2008-09-10get rid of udev_sysdeps.cKay Sievers
2008-09-06use libudev code, unify logging, pass udev context around everywhereKay Sievers
2008-08-12add missing includesKay Sievers
2008-07-30use autotoolsKay Sievers
2008-04-20logging: add trailing newline to all stringsKay Sievers
2007-10-15usb_id: fail if vendor/product can not be retrievedKay Sievers
Thanks to Daniel Drake for identifying the bug.
2007-05-01usb_id: add <devpath> to help textKay Sievers
2007-03-21usb_id: append target:lun to storage device serialKay Sievers
Some broken usb-storage devices implement multiple luns with all the same SCSI identifiers. Append the target:lun to get unique names in /dev/disk/by-id/.
2006-08-19consistent key naming to match only the event device or include all parent ↵Kay Sievers
devices This scheme is more consistent and makes it obvious if a match happens against the event device only, or the full chain of parent devices. The old key names are now: BUS -> SUBSYSTEMS ID -> KERNELS SYSFS -> ATTRS DRIVER -> DRIVERS Match keys for the event device: KERNEL SUBSYSTEM ATTR DRIVER (in a future release, for now the same as DRIVERS) Match keys for all devices along the parent device chain: KERNELS SUBSYSTEMS ATTRS DRIVERS ID, BUS, SYSFS are no longer mentioned in the man page but still work. DRIVER must be converted to DRIVERS to match the new scheme. For now, an error is logged, if DRIVER is used. In a future release, the DRIVER key behaviour will change.
2006-04-11usb_id: remove uneeded codeKay Sievers
2006-01-23usb_id: don't fail on other subsytems than "scsi"Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-18scsi_id, usb_id: request device parent by subsystemKay Sievers
Request specific parents identified by subsystem and don't rely on a predefined sequence. Also let the devpath be longer than 72 chars, tsss ... Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-09replace libsysfsKay Sievers
We never used any of the libsysfs convenience features. Here we replace it completely with 300 lines of code, which are much simpler and a bit faster cause udev(d) does not open any syfs file for a simple event which does not need any parent device information. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-27switch tools and volume_id from LGPL to GPLv2Kay Sievers
After beeing hit by proprietary applications which statically link the LGPL'd libusb, which needs a patch to reflect the recent kernel changes, I decided not to provide LGPL code anymore. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-22*_id: fix zero length in set_str()Kay Sievers
Thanks to Olaf Hering <olh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-13fix more compiler warnings ...Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-01fix GGC signed pointer warnings and switch volume_id to stdintKay Sievers
Solaris uses volume_id now and they fiddled around with configure scripts to map the linux kernel int types. Adding the types locally to volume_id breaks the klibc build, so just switch to these ugly types and forget it. :) Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-19usb_id: fix typoHannes Reinecke
2005-07-19add ID_BUS to *_id programsHannes Reinecke
2005-07-17add padding to rules structureKay Sievers
Some architectures really want well alingned structures. Thanks to Jim Gifford <maillist@jg555.com> for help finding it. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-08fix usb_id and let scsi_id ignore "illegal request"Hannes Reinecke
2005-07-04add usb_id program to generate usb-storage device identifiersKay Sievers
Signed-off-by: Hannes Reinecke <hare@suse.de>