1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

72 Commits

Author SHA1 Message Date
Kay Sievers
48a9b173e8 libudev: move to top-level directory 2009-06-08 21:36:06 +02:00
Kay Sievers
065db05221 use more efficient string copying 2009-05-20 17:57:52 +02:00
Kay Sievers
241e5a21f9 usb_id: remove unused variable 2009-03-28 20:57:01 +01:00
Kay Sievers
9ae847f420 usb_id: add ID_VENDOR_ID, ID_MODEL_ID, ID_USB_INTERFACE_NUM, ID_USB_DRIVER
$ 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-03-25 21:24:21 +01:00
Adam Buchbinder
57df0207aa usb_id: add manpage
Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
2009-03-16 23:09:32 +01:00
Kay Sievers
5afd777ebb usb_id: fix comment 2009-02-26 22:10:40 +01:00
Kay Sievers
468641f87f usb_id: fix NULL string usage 2009-02-26 20:57:48 +01:00
Kay Sievers
f95f1deea1 usb_id: return values if called directly for an usb_device 2009-02-26 17:58:22 +01:00
Kay Sievers
7e827bcde8 usb_id: add ID_USB_INTERFACES=:0e0100:0e0200:010100:010200: 2009-02-26 17:05:58 +01:00
David Zeuthen
ad88f9409a *_id: add model/vendor enc strings
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-02-17 21:45:43 +01:00
Kay Sievers
e339233993 usb_id: handle ATAPI devices like SCSI devices
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-22 19:23:33 +01:00
Adam Buchbinder
fdcd1f4666 extras: fix mis-spelling of "environment" 2009-01-06 19:43:01 +01:00
Kay Sievers
9bd66b9dbf usb_id: s/image/media/ 2009-01-05 03:44:28 +01:00
Kay Sievers
4fad506ed8 usb_id: use devtype lookup 2009-01-03 15:26:34 +01:00
Marcel Holtmann
61ee8cc92d libudev: device - remove udev_device_get_parent_with_subsystem 2009-01-03 15:12:28 +01:00
Kay Sievers
e6fa87a11f usb_id: add "image" class 2008-12-29 05:54:44 +01:00
Kay Sievers
5d89ef7bf9 make: do not delete autotools generated file with distclean
[...] running the command
`make maintainer-clean' should not delete `configure' even if
`configure' can be remade using a rule in the Makefile.  More
generally, `make maintainer-clean' should not delete anything that
needs to exist in order to run `configure' and then begin to build
the program.  This is the only exception; `maintainer-clean' should
delete everything else that can be rebuilt.
2008-12-06 04:03:08 +01:00
Kay Sievers
aba31da054 usb_id: add "break" to currently unused case labels 2008-11-26 13:38:49 +01:00
Marcel Holtmann
62a7b2d5a5 usb_id: fix switch statement for video type
Introducing the video type, creating a fall-through case where other
devices might now be declared as type video.
2008-11-26 13:31:37 +01:00
Kay Sievers
5317ca29e5 usb_id: replace chars in returned strings
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-20 02:44:08 +01:00
Kay Sievers
24239ded2d rules: v4l - add by-id/ links for USB devices
/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-20 02:26:13 +01:00
Kay Sievers
92f4313665 unify string replacement 2008-11-05 21:49:52 +01:00
Kay Sievers
b467444884 usb_id: MassStorage SubClass 6 is "scsi" not "disk" 2008-11-05 19:02:56 +01:00
Kay Sievers
f6bb9e981a fix uninitialized variable warnings 2008-10-24 09:37:37 +02:00
Kay Sievers
69239210be libudev: device - get_attr_value() -> get_sysattr_value() 2008-10-20 18:12:36 +02:00
Kay Sievers
2f1a291e2f usb_id: use libudev 2008-10-02 21:20:18 +02:00
Kay Sievers
e598c5738c libudev: get rid of selinux
"Hello world!" linked against libselinux parses /proc/mounts and
whatever else on startup, even when the lib is not needed at all.
Not funny! Get rid of that thing where it's not absolutely needed.
2008-10-02 18:48:40 +02:00
Kay Sievers
033e9f8cde use no_argument, required_argument, optional_argument in longopts 2008-10-02 16:49:05 +02:00
Kay Sievers
4aa0b15efb fix dbg() callers 2008-09-29 19:03:08 +02:00
Kay Sievers
38f27948cd always include config.h from Makefile 2008-09-19 23:03:49 -07:00
Kay Sievers
31c1f53745 get rid of udev_sysdeps.c 2008-09-10 18:59:42 +02:00
Kay Sievers
ecc9ec579f convert to libudev and delete udev_utils_string.c 2008-09-10 18:39:23 +02:00
Kay Sievers
7525097713 extras: use libudev code 2008-09-10 18:24:39 +02:00
Kay Sievers
b2946df419 libudev: rename libudev-utils.c libudev-util.c 2008-09-10 17:12:33 +02:00
Kay Sievers
7a01f11afb libudev: get rid of udev_utils.c 2008-09-10 17:08:24 +02:00
Kay Sievers
b21b95d722 libudev: get rid of udev_sysfs.c 2008-09-10 14:29:07 +02:00
Kay Sievers
4f4b12c203 libudev: add selinux 2008-09-10 00:46:17 +02:00
Kay Sievers
7d563a17f3 use libudev code, unify logging, pass udev context around everywhere 2008-09-06 15:45:31 +02:00
Kay Sievers
b7ec267e17 add missing includes 2008-08-12 11:18:39 +02:00
Kay Sievers
01618658fd use autotools 2008-07-30 01:45:23 +02:00
Kay Sievers
726687ad48 delete all Makefiles and move udev source to udev/ 2008-07-30 00:39:15 +02:00
Kay Sievers
c70560feef logging: add trailing newline to all strings 2008-04-20 21:07:06 +02:00
Roy Marples
064360cde8 Makefile: do not require GNU install 2008-03-15 00:02:39 +01:00
Dan Nicholson
c8e826147a extras: ignore built and generated files 2007-11-08 00:13:40 +01:00
Kay Sievers
963033472f usb_id: fail if vendor/product can not be retrieved
Thanks to Daniel Drake for identifying the bug.
2007-10-15 20:38:20 +02:00
Kay Sievers
5f605a6cf1 usb_id: add <devpath> to help text 2007-05-01 14:18:36 +02:00
Kay Sievers
e578a44746 usb_id: append target:lun to storage device serial
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/.
2007-03-21 13:55:48 +01:00
Peter Breitenlohner
86f4ea067e fix INSTALL_PROGRAM vs. INSTALL_SCRIPT 2007-01-21 15:48:58 +01:00
Kay Sievers
95776dc6ec consistent key naming to match only the event device or include all parent 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-08-19 16:06:25 +02:00
Kay Sievers
c76b97dc4d Makefiles: fix .PHONY for man page target
Thanks to David Härdeman for pointing it out.
2006-07-04 18:41:07 +02:00