1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-11-01 00:51:08 +03:00
Commit Graph

465 Commits

Author SHA1 Message Date
Kay Sievers
485fd28cfa usb_id: remove uneeded code 2006-04-11 19:33:51 +02:00
Kay Sievers
f7dd3a57a4 volume_id: move some debug to info level 2006-04-08 05:04:35 +02:00
Kay Sievers
1017f139b3 volume_id: fix endianess conversion typo for FAT32 2006-04-05 17:31:49 +02:00
Kay Sievers
66e14ae7de fix symlink targets in Makefiles 2006-04-03 14:40:06 +02:00
Kay Sievers
cee5700cde volume_id: generate man page from xml source 2006-03-30 02:13:22 +02:00
Kay Sievers
f05da2ae00 volume_id: update README 2006-03-30 01:52:12 +02:00
Kay Sievers
1fda06ae98 pass CROSS_COMPILE to AR and RANLIB down to extras/ 2006-03-30 00:48:30 +02:00
Kay Sievers
4809b49e41 move all *_id programs to /lib/udev/ 2006-03-29 14:44:41 +02:00
Kay Sievers
16801abde1 man pages: mention udev(7) not udev(8)
Thanks to:
  Henrique de Moraes Holschuh <hmh@debian.org>
2006-03-28 20:16:34 +02:00
Kay Sievers
15ff0ba36e remove all stripping code 2006-03-28 03:09:18 +02:00
Kay Sievers
92da64c700 volume_id: define exported symbols 2006-03-28 02:52:58 +02:00
Kay Sievers
d5618ac969 volume_id: remove some global symbols 2006-03-27 23:03:25 +02:00
Kay Sievers
e688ad2d0d because is better than cause 2006-03-27 20:22:00 +02:00
Kay Sievers
c643d61836 volume_id: use shared library by default 2006-03-27 19:30:56 +02:00
Kay Sievers
83cc6ab476 volume_id: rename subdirectory 2006-03-27 18:05:17 +02:00
Kay Sievers
b5e6942671 volume_id: provide a custom debug function 2006-03-27 17:59:22 +02:00
Kay Sievers
2d82e6f053 volume_id: provide library 2006-03-23 10:50:55 +01:00
Hannes Reinecke
24c27caf82 path_id: add bus to USB path 2006-03-22 12:21:49 +01:00
Kay Sievers
a05098641e fix output for USB path 2006-03-21 17:28:47 +01:00
Kay Sievers
7808297b0f volume_id: remove all partition table support 2006-03-21 16:16:55 +01:00
Hannes Reinecke
10a9bff1c3 persistent links: add scsi tape links and usb path support 2006-03-21 16:10:18 +01:00
Kay Sievers
0eb9e4a87e volume_id: remove partition table parsing code 2006-03-21 16:02:07 +01:00
Kay Sievers
2f567dd62e volume_id: add squashfs detection 2006-03-08 19:44:28 +01:00
Kay Sievers
cdce0be895 remove devfs rules and scripts 2006-03-08 00:34:36 +01:00
Hannes Reinecke
226c074d6d path_id: support SAS devices 2006-03-01 20:07:20 +01:00
Masatake YAMATO
5016ef53f5 typo in debug text in udev_run_hotplugd.c 2006-03-01 20:02:41 +01:00
Kay Sievers
dd8140ae79 volume_id: add missing return 2006-02-21 19:14:43 +01:00
Kay Sievers
ab925d69d5 volume_id: split raid and filesystem detection 2006-02-21 18:48:28 +01:00
Kay Sievers
467546b586 volume_id: replace __packed__ by PACKED macro 2006-02-21 18:44:18 +01:00
Jeroen Roovers
c779c930f1 fix typo in parisc support to path_id
As reported at http://bugs.gentoo.org/show_bug.cgi?id=113379
path_id is still broken for parisc boxes.  This patch from
Jeroen Roovers <jer@gentoo.org> fixes that.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-15 21:06:19 +01:00
Kay Sievers
42878445d7 cramfs detection for bigendian
Patch from Olaf Hering <olh@suse.de>.
2006-02-13 06:29:30 +01:00
Kay Sievers
3d94fb8742 scsi_id: remove dead files
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-28 16:42:49 +01:00
Kay Sievers
c1979c82e1 whitespace fixes
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-28 16:39:46 +01:00
Kay Sievers
1ef985452b replace fancy silent build program by simple kernel build like logic
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-28 04:44:51 +01:00
Kay Sievers
f83cccb979 usb_id: don't fail on other subsytems than "scsi"
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-23 19:09:17 +01:00
Kay Sievers
aabc6a7294 path_id: handle fiber channel
Patch from: Hannes Reinecke <hare@suse.de>

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-23 19:08:06 +01:00
Kay Sievers
fbc5a2b921 path_id: work with "all devices in /sys/devices"
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-19 04:54:34 +01:00
Kay Sievers
6ecd4d1e36 scsi_id, usb_id: request device parent by subsystem
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-18 04:24:48 +01:00
Kay Sievers
e3440f37f0 vol_id: probe volume as user nobody
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-13 13:18:41 +01:00
Kay Sievers
1aa1e24848 replace libsysfs
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>
2006-01-09 21:18:00 +01:00
Kay Sievers
47fbf3c582 path_id: fix invalid character class
Thanks to Marco for the _right_ fix.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-09 21:17:24 +01:00
Kay Sievers
892532a939 scsi_id: read page 0x80 with libata drives
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-12-23 00:06:54 +01:00
Kay Sievers
89a8f4e75e fix segfaulting create_floppy_devices
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-12-15 15:56:50 +01:00
Kurt Garloff
cbba4a5446 support pre-SPC3 page 83 format 2005-12-15 13:01:01 +01:00
Hannes Reinecke
d313632b04 fold multiple consecutive whitespace chars into single '_' 2005-12-15 12:22:42 +01:00
Greg Kroah-Hartman
f3aef1a78e add parisc support to path_id
As reported at http://bugs.gentoo.org/show_bug.cgi?id=113379 path_id
doesn't work too well for parisc boxes.  This patch from Jeroen Roovers
<jer@gentoo.org> fixes that.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-12-07 14:00:05 -08:00
Kay Sievers
a8a614a701 remove outdated and misleading stuff
Packagers who still need this, should carry it in their own
package. It just causes too much trouble to users to have it
in the tree and expect that it's needed or the way to do it.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-25 18:50:42 +01:00
Kay Sievers
e0dc4f00ba move some helpers from extras to /lib/udev
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-22 17:31:38 +01:00
Kay Sievers
cfd0fc6605 libvolume_id: fix weird fat volume recognition
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-21 18:28:56 +01:00
Kay Sievers
d7363ee14c Makefile: remove exec_prefix and srcdir
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-16 04:35:37 +01:00
Kay Sievers
88be7e8887 volume_id: use glibc's byteswap
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-12 14:28:22 +01:00
Kay Sievers
009364eef9 volume_id: include stddef.h header
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-12 04:11:08 +01:00
Kay Sievers
08f403cc37 fix typo in eventrecorder
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-10 04:35:35 +01:00
Kay Sievers
a8d141a3c1 replace udeveventrecorder by a shell script
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-10 02:06:43 +01:00
Greg Kroah-Hartman
f054627f50 Merge branch 'master' of gregkh@master.kernel.org:/pub/scm/linux/hotplug/udev 2005-11-09 09:53:53 -08:00
Greg Kroah-Hartman
54eb6a122f Make run_directory.c stat the place it is going to try to run.
This should remove a lot of error messages that people are seeing.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-09 09:53:32 -08:00
Kay Sievers
accff72685 volume_id: provide libvolume_id.a file
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-09 15:08:45 +01:00
Jan Luebbe
0c25d156b0 add man pages for *_id programs
I've written manpages for the *_id binaries, which are attached to this
mail.
2005-10-31 02:10:56 +01:00
Kay Sievers
c1bf1edeb7 "STRIPCMD=" for the EXTRAS
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-28 01:49:22 +02:00
Kay Sievers
49fb51c615 use DESTDIR on uninstall, no need to pass prefix to submake
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2005-10-27 18:42:52 +02:00
Kay Sievers
81d719a1d4 volume_id: Version 052
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 21:13:10 +02:00
Kay Sievers
7f0a5b8095 volume_id: fix typo in ext blocksize check
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 21:12:51 +02:00
Kay Sievers
eba25b20ce volume_id: Version 051
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 19:16:01 +02:00
Kay Sievers
04b222b4b0 volume_id: make FAT32 recognition more robust
FAT32 volumes should never have a cluster count, that fits
into a 16 bit value, but mkdosfs can create such volumes.
No sane formatter or Windows will ever do this, but the
Linux kernel as Windows can read/write it.

Thanks to Ted Ts'o <tytso@mit.edu> for convincing me.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 19:15:07 +02:00
Kay Sievers
1305b47167 volume_id: add vxfs include
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 18:56:30 +02:00
Kay Sievers
b586687138 volume_id: fix typo in ocfs
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 18:55:22 +02:00
Kay Sievers
f3c14c6849 volume_id: move blocksize validation to fix jbd recognition
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 18:54:34 +02:00
Kay Sievers
c929358e02 volume_id: check ext fs for valid blocksize, cause magic is only 2 bytes
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 17:41:55 +02:00
Kay Sievers
79bd4f2229 volume_id: add Veritas fs
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 16:31:13 +02:00
Kay Sievers
0ecc6c1b19 volume_id: add OVFS Version 1
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-23 16:08:56 +02:00
Kay Sievers
2321ba6fd8 switch tools and volume_id from LGPL to GPLv2
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-09-27 16:27:35 +02:00
Kay Sievers
2d8af104e0 remove no longer needed includes
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-27 15:05:34 +02:00
Kay Sievers
3a9fc64167 volume_id: set reiser instead of reiserfs for filesystem type
Thanks to Theodore Ts'o <tytso@mit.edu> for the hint and a test image.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-18 05:06:10 +02:00
Kay Sievers
0e5f8a1fcc scsi_id: switch temporary node creation to /dev
/tmp is not writable on most systems, so just use /dev to create a
temporary node. If called from a udev rule, "-d $tempnode" should be
used and udev will create a temporary node and pass the name before
calling scsi_id.
Also remove gen_scsi_id_udev_rules.sh per Patrick's request, as it's
no longer needed with the persistent disk links.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-18 04:49:23 +02:00
Kay Sievers
3515c0ad00 ata_id: open volume O_NONBLOCK
Opticals like that and should be ok for disks too, as long as we
don't read().

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-16 21:23:36 +02:00
John Hull
4b12433517 edd_id: check that EDD id is unique
The attached patch adds a check to edd_id.c to verify that the MBR
signature on the device node passed to the program is unique to only
that disk.

Signed-off-by: John Hull <john_hull@dell.com>
2005-09-16 21:10:12 +02:00
Marco d'Itri
77914dfeda run_directory: fix typo in "make install" 2005-09-16 21:05:15 +02:00
Edward Goggin
50be140174 scsi_id: derive a UID for a SCSI-2 not compliant with the page 83
This patch is to enable the use of scsi_id to derive a UID for a SCSI-2
device which is not compliant with the page 83 inquiry reply format for
either SPC-2 or SPC-3.  In this case, the page 83 reply does not
contain a list of  Identification descriptors but a single binary encoded
hexa-decimal Vendor Specified Identifier.

The update is being driven by the need for scsi_id to support older
model EMC Symmetrix hardware, that is, models 4, 5, and 6.
2005-09-14 20:23:48 +02:00
Kay Sievers
85701baede add install test to 'make buildtest'
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-14 17:29:27 +02:00
Kay Sievers
db28d2ea4f EXTRAS: cleanup and sync all Makefiles
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-14 17:00:02 +02:00
Kay Sievers
726b21604a volume_id: fix error handling with failing read()
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-14 14:29:59 +02:00
Jürg Billeter
1ac216b198 EXTRAS/Makefile: fix install targets to match main Makefile 2005-09-14 14:27:28 +02:00
Kay Sievers
852cc0f58d remove chassis_id program
Broken and unmaintained!

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-12 14:28:59 +02:00
Duncan Sands
609435bad6 firmware_helper: fix write count 2005-09-09 12:38:58 +02:00
Kay Sievers
aab571f362 fix useless but funny name_cdrom.pl script to work again
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-08 12:24:18 +02:00
Kay Sievers
fc04985839 delete cdromsymlinks* - obsoleted by cdrom_id and IMPORT rules
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-08 03:34:34 +02:00
Kay Sievers
077ed27c55 add edd_id tool to match BIOS EDD disk information
Thanks to:
    John Hull <John_Hull@Dell.com>
    Matt Domsch <Matt_Domsch@Dell.com>

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-09-06 12:18:04 +02:00
Kay Sievers
7596a56298 scsi_id: rename SYSFS to LIBSYSFS
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-31 23:36:25 +02:00
Kay Sievers
0e47c219fc Makefile: remove all the duplicated rules
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-30 17:03:25 +02:00
Kay Sievers
e79952c598 vol_id: ID_LABEL_SAFE will no longer contain fancy characters
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-28 23:16:56 +02:00
Thierry Vignaud
c4ef16f92c switch to '==' in raid-devfs.sh 2005-08-26 14:52:57 +02:00
Kay Sievers
cf7cad9dc9 path_id: remove SUSE specific PATH
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-25 00:40:41 +02:00
Amir Shalem
440103fcfc fix typo in firmware_helper
The wrong string is being nullifed.
2005-08-25 00:39:45 +02:00
Kay Sievers
8d77c6a383 volume_id: don't probe for mac_partition_maps
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-25 00:37:46 +02:00
Kay Sievers
c907c823c3 *_id: fix zero length in set_str()
Thanks to Olaf Hering <olh@suse.de>

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-22 11:37:12 +02:00
Kay Sievers
e331c54dc5 fix typo in cdrom_id syslog
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-18 04:54:59 +02:00
Kay Sievers
5097a6ca42 Merge rsync://rsync.kernel.org/pub/scm/linux/hotplug/udev 2005-08-18 04:48:43 +02:00
Greg Kroah-Hartman
a961dcbf0d cdrom_id: change err() to info() to help with debugging problems
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-17 16:10:32 -07:00
Greg Kroah-Hartman
fc046d4d08 Always open the cdrom drive in non-blocking mode in cdrom_id
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-17 16:09:03 -07:00
Kay Sievers
f7a144a5be vol_id: fix sloppy error handling
vol_id segfaults if read() fails on broken devices reporting
the wrong size.

Thanks to Erhard Schultchen for the debugging.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-17 16:58:19 +02:00
Kay Sievers
b5d88a0cfe Merge rsync://rsync.kernel.org/pub/scm/linux/hotplug/udev 2005-08-13 02:16:54 +02:00
Kay Sievers
853ccc433c fix more compiler warnings ...
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-13 00:18:44 +02:00
Greg Kroah-Hartman
903a36495f added the cdrom.h #defines directly into the cdrom_id.c file
This solves the problem with building the file against old kernel header
files.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-12 11:37:56 -07:00
Greg KH
5a64cea1e1 fix klibc build issue in cdrom_id.c
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-11 14:38:33 -07:00
Greg KH
8ee99e3279 changed cdrom_id exports to be easier to understand and consistant with other _id programs.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-11 14:04:24 -07:00
Greg KH
8f6919e639 Created cdrom_id program to make it easier to determine cdrom types
Based on the framework from ata_id by Kay.
Now we can drop the cdsymlinks.sh and .c files

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-11 13:59:21 -07:00
Kay Sievers
27f877e60f allow logging of all output from executed tools
If USE_DEBUG=true and udev_log="debug", all output of the forked
programs to stdout and stderr is send to syslog.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-11 17:32:59 +02:00
Kay Sievers
d47fd445bd trivial text cleanups
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-09 22:11:44 +02:00
Kay Sievers
a37610d0f8 remove example rules and put the dev.d stuff into the run_directory folder
The distro rules are the best example you can get and the use of
dev.d/ is no longer recommended.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-09 20:11:26 +02:00
Kay Sievers
6214290df5 more distro rules updates
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-09 19:17:25 +02:00
Kay Sievers
bebbc31b90 add firmware_helper to load firmware
From: Bill Nottingham <notting@redhat.com>

Changed reading of firmware blob to mmap and let firmware_helper
follow the setting of the log level with UDEV_LOG.
2005-08-09 19:00:37 +02:00
Greg Kroah-Hartman
97b7aa1f78 Added horrible (but fun) path_id script to extras.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-01 16:37:41 -07:00
Kay Sievers
70721db6d7 fix GGC signed pointer warnings and switch volume_id to stdint
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-08-01 01:33:36 +02:00
Kay Sievers
e8d569b414 move code to its own files
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-22 12:35:58 -04:00
Hannes Reinecke
33aa91b1be usb_id: fix typo 2005-07-19 14:36:34 -04:00
Hannes Reinecke
46f01c6dc4 add ID_BUS to *_id programs 2005-07-19 11:18:19 -04:00
Hannes Reinecke
bf375e3af6 create_floppy_devices: add tool to create floppy nodes based on sysfs info 2005-07-19 11:14:12 -04:00
Andre Masella
6a5aac78f4 volume_id: add OCFS (Oracle Cluster File System) support 2005-07-17 09:54:40 -04:00
Kay Sievers
422d5becc3 add padding to rules structure
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-17 09:40:29 -04:00
Greg KH
04b90b7e25 Really commit the udev_run_devd changes... 2005-07-14 15:24:59 -07:00
Greg KH
78e21e3ed4 Fixed udev_run_devd to run the /etc/dev.d/DEVNAME/ files too
Note, this assumes that you are putting your device nodes in /dev/, the
better thing to do is use the RUN= rule and not rely on this program at all.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-14 15:19:37 -07:00
Kay Sievers
b0f57eb066 volume_id: remove s390 dasd handling, it is dasd_id now
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-13 12:01:53 +02:00
Hannes Reinecke
15e5209b8e dasd_id: add s390 disk-label prober
Signed-off-by: Hannes Reinecke <hare@suse.de>
2005-07-13 11:35:51 +02:00
Kay Sievers
5f84d7264d trivial fixes for *_id programs
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-13 11:23:21 +02:00
Kay Sievers
e03bce6321 ata_id: check for empty serial number
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-12 11:41:09 +02:00
Kay Sievers
4431072fb8 compile dasd only on s390
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-12 11:39:56 +02:00
Hannes Reinecke
b4a2906bf1 fix usb_id and let scsi_id ignore "illegal request" 2005-07-08 03:29:19 +02:00
Kay Sievers
7618e112b4 add usb_id program to generate usb-storage device identifiers
Signed-off-by: Hannes Reinecke <hare@suse.de>
2005-07-04 17:02:25 +02:00
Kay Sievers
aaff09a30a add ID_TYPE to the id probers
Export the type of device from ata_id and scsi_id, also strip
leading and trailing whitespace and substitute consecutive
whitespace with a single underline char.

From: Hannes Reinecke <hare@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-27 17:04:56 +02:00
Kay Sievers
34129109a1 add -x to scsi_id to export the queried values in env format
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-27 02:51:49 +02:00
Kay Sievers
b8476286d6 store the imported device information in the udevdb
Any program can query with udevinfo for persistent device
attributes evaluated on device discovery now.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-26 18:55:24 +02:00
Kay Sievers
208f6aba21 rename udev_volume_id to vol_id and add --export option
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-26 01:54:47 +02:00
Kay Sievers
670e470543 add ata_id to read serial numbers from ATA drives
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-25 23:54:28 +02:00
Kay Sievers
c07669bd66 udev: handle all events - not only class and block devices
Handle all events with rules. If udev is expected to handle hotplug.d/
the exernal helper must be called.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05 15:55:29 +02:00
Kay Sievers
c2401132bf volume_id: use udev-provided log-level
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05 05:17:21 +02:00
Kay Sievers
6a522681e1 udev: move dev.d/ handling to external helper
Modern rules are expected to call notification and postprocessing with    
the RUN key. For compatibility the current behavior can be emulated
with an external helper.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05 05:11:29 +02:00
Darren Salt
d514329ee2 [PATCH] update cdsymlinks to latest version
diff -ur udev-057.orig/extras/cdsymlinks.c udev-057/extras/cdsymlinks.c
2005-05-20 12:59:17 -07:00
kay.sievers@vrfy.org
5160379804 [PATCH] udev_volume_id: fix endianess macros 2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org
92ebb398ed [PATCH] klibc: use klcc wrapper instead of our own Makefile 2005-04-26 23:53:53 -07:00
kay.sievers@vrfy.org
7d227c5f34 [PATCH] volume_id: version 43 2005-04-26 23:53:53 -07:00
hare@suse.de
cc44094d63 [PATCH] volume_id: Fix label/uuid reading for reiserfs
Well, I just asked our resident reiserfs guru (thx mason :-).
Reiser v3.5 does not support labels nor uuids.
2005-04-26 23:53:18 -07:00
kay.sievers@vrfy.org
afa3c553b1 [PATCH] volume_id: version 42 2005-04-26 23:53:17 -07:00
kay.sievers@vrfy.org
7c492da7f7 [PATCH] volume_id: version 41 2005-04-26 23:53:17 -07:00
tklauser@access.unizh.ch
9066c16ada [PATCH] The following patch fixes some warnings when compiling volume_id 2005-04-26 23:53:17 -07:00
tklauser@access.unizh.ch
e296b1476e [PATCH] The following patch fixes a warning when compiling chassis_id 2005-04-26 23:53:17 -07:00
kay.sievers@vrfy.org
138068d690 [PATCH] fix ia64 compile 2005-04-26 23:51:00 -07:00
kay.sievers@vrfy.org
845d4751ac [PATCH] udev_volume_id: version 39 2005-04-26 23:51:00 -07:00
kay.sievers@vrfy.org
6c18b1fb87 [PATCH] rename LOG to USE_LOG in all places 2005-04-26 23:48:48 -07:00
kay.sievers@vrfy.org
30c6b4c9a2 [PATCH] udev_volume_id: volume_id v38 2005-04-26 23:48:48 -07:00
patmans@us.ibm.com
4e05e4238b [PATCH] update scsi_id to work with libsysfs changes
Update scsi_id to work with the libsysfs changes in udev: use
sysfs_get_classdev_attr and sysfs_get_device_attr in place of
sysfs_read_attribute_value.
2005-04-26 23:39:48 -07:00
tklauser@access.unizh.ch
8d1b4df219 [PATCH] udev_volume_id: add Reiser4 support 2005-04-26 23:36:13 -07:00
kay.sievers@vrfy.org
e4d4a557e5 [PATCH] udev_volume_id: volume_id v35 2005-04-26 23:36:13 -07:00
patmans@us.ibm.com
07544a93d6 [PATCH] scsi_id changes for use with udev %N and %p
Changes to scsi_id to support the udev %N and %p substitutions:

- Update version from .7 to .8

- change TMP_DIR back to /tmp

- if DEVPATH is set assume hotplug_mode (use syslog for logging, and does
  not output some warnings)

- Always output a newline after the id is printed

- Allow command line options to override settings when hotplug_mode is set

- update man page

- update generator script to use the %N and %p substitutions.
2005-04-26 23:35:15 -07:00
kay.sievers@vrfy.org
d384abd2bd [PATCH] udev_volume_id: fix typo 2005-04-26 23:34:04 -07:00
kay.sievers@vrfy.org
27753a3cf7 [PATCH] udev_volume_id: remove temporary node creation and parent handling
udev can create the temporary node for us now. (On bootup we don't
know where a writable filesystem is mounted). Also the parent handling
is not needed anymore, cause udev is able to pass us the node name
of the parent device.
2005-04-26 23:31:05 -07:00
kay.sievers@vrfy.org
866bb54704 [PATCH] udev_volume_id: remove __packed__ from dasd structure as it does not work 2005-04-26 23:31:02 -07:00
greg@kroah.com
3a030b511f [PATCH] fix example comment in ide-devfs.sh 2005-04-26 23:28:12 -07:00
kay.sievers@vrfy.org
bce52be81e [PATCH] udev_volume_id: fix dasd disklabel reading with -l option 2005-04-26 23:27:03 -07:00
kay.sievers@vrfy.org
9d4791b66a [PATCH] udev_volume_id: volume_id version 034 2005-04-26 23:26:14 -07:00
md@Linux.IT
882b97455b [PATCH] raid-devfs.sh: devfs names for hardware RAID controllers 2005-04-26 23:24:20 -07:00
md@Linux.IT
fd3eeb7502 [PATCH] scsi_id: when udevstart is started, /tmp is not writeable. 2005-04-26 23:24:20 -07:00
md@Linux.IT
0c50db890e [PATCH] cdsymlinks.sh: trivial fix, the variable is initialized to '', not 0 2005-04-26 23:24:20 -07:00
kay.sievers@vrfy.org
d9cf0b0a7c [PATCH] udev_volume_id: rename probe_ibm into probe_dasd 2005-04-26 23:24:19 -07:00
kay.sievers@vrfy.org
7979e3d4b7 [PATCH] udev_volume_id: volume_id version 032 2005-04-26 23:24:19 -07:00
kay.sievers@vrfy.org
51df9ee496 [PATCH] Makefile: add some more warnings and prepare for clean gcc4 compile 2005-04-26 23:24:19 -07:00
kay.sievers@vrfy.org
1134a81b98 [PATCH] fix -Wsign-compare warnings 2005-04-26 23:24:19 -07:00
kay.sievers@vrfy.org
9172c95c77 [PATCH] chassis_id: clean compilation and fix bad function parameter passing
Adding prototypes for functions resulted in an error, cause:
  table_find_disk(disk_snum, &chassis_num, &slot_num);

is called but the function is defined as:
  int table_find_disk(char *serialnumber , int *host_num, int *chassis_num, int *slot_num)

which can obviously not work correctly.

Using popen() is not klibc compatible, so skip the compilation if
a klibc compile is requested.
2005-04-26 23:24:19 -07:00
kay.sievers@vrfy.org
c033fd9f01 [PATCH] udev_volume_id: new version of volume_id
Every filesystem has its own subdirectory.
The IBM dasd label reading is included into volume_id.
2005-04-26 23:24:19 -07:00
cborntra@de.ibm.com
61b24e5e19 [PATCH] udev_volume_id: fix -d option
The -d option in udev_allows to go from a partition to the underlying disk
for s390 dasd labels. If the device is already the disk itself, finding the 
parent will fail, therefore -d on /sys/block/dasda/ for example gives no 
result at all.
2005-04-26 23:21:58 -07:00
kay.sievers@vrfy.org
eb064000ca [PATCH] udev_volume_id: fix FAT label reading 2005-04-26 23:21:58 -07:00
kay.sievers@vrfy.org
240ce55179 [PATCH] udev_volume_id: version 27
Fix FAT label reading bug for very large volumes.
Recognize FAT label at Win98 formatted volumes.
Read iso9660 joliet descriptor for unicode labels.
Support uuid/label of swap partitions.
2005-04-26 23:21:58 -07:00
greg@kroah.com
ce5c75b8e1 [PATCH] fix udev_volume_id build error.
bah, when will I remember to check the extras _before_ I do a release...
2005-04-26 23:17:47 -07:00
kay.sievers@vrfy.org
c2fe814e30 [PATCH] udev_volume_id: links sysfs.a instead of all objects
cuts down the size from:
  dynamically linked: 48.030 -> 45.187
  statically linked:  149.177 ->  142.362
2005-04-26 23:13:47 -07:00
greg@kroah.com
c93053663f [PATCH] fix udev_volume_id so it will now build properly. 2005-04-26 23:13:47 -07:00
Greg KH
5e7d9f4060 more merge fixups 2005-04-26 23:10:15 -07:00
Greg KH
97adaace4f more fixups 2005-04-26 22:54:32 -07:00
sschweizer@gmail.com
8a0dc204e9 [PATCH] Allow GROUP to have modifiers in it 2005-04-26 22:43:36 -07:00
kay.sievers@vrfy.org
a5d00f9d37 [PATCH] Add support for highpoint ataraid to volume_id to suppress 2005-04-26 22:09:26 -07:00
kay.sievers@vrfy.org
a9ce604122 [PATCH] Patches from Harald Hoyer <harald@redhat.com>. 2005-04-26 22:09:26 -07:00
kay.sievers@vrfy.org
ff694eca17 [PATCH] fix debug in volume id / fix clashing global var name
Here we get the logging for udev_volume_id working if it is compiled
with DEBUG=true. Also fixed is a name clash with a global variable.
2005-04-26 22:06:44 -07:00
kay.sievers@vrfy.org
1b1ba93365 [PATCH] volume_id fix
I've been told that open() should not pass O_NONBLOCK.
2005-04-26 22:06:43 -07:00
kay.sievers@vrfy.org
7a947ce515 [PATCH] big cleanup of internal udev api
Here is the first patch to cleanup the internal processing of the
various stages of an udev event. It should not change any behavior,
but if your system depends on udev, please always test it before reboot :)

We pass only one generic structure around between add, remove,
namedev, db and dev_d handling and make all relevant data available
to all internal stages. All udev structures are renamed to "udev".

We replace the fake parameter by a flag in the udev structure.

We open the class device in the main binaries and not in udev_add, to
make it possible to use libsysfs for udevstart directory crawling.

The last sleep parameters are removed.
2005-04-26 22:02:46 -07:00
patmans@us.ibm.com
b337e60790 [PATCH] update udev to scsi_id 0.7
Update udev's scsi_id to version 0.7, this fixes a bad bug in scsi_id on
64 bit systems.
2005-04-26 22:02:45 -07:00
greg@kroah.com
79db6912cf [PATCH] add very nice cdsymlinks scripts.
These are from Darren Salt <linux@youmustbejoking.demon.co.uk>
2005-04-26 22:02:45 -07:00
greg@kroah.com
29afcc5f11 [PATCH] add some helper scripts for dvb and input devices. 2005-04-26 22:02:45 -07:00
greg@kroah.com
396bb4c3d3 [PATCH] let the extras/ programs build "pretty" also 2005-04-26 22:02:45 -07:00
patmans@us.ibm.com
125930b454 [PATCH] pass SYSFS setting down for extras builds
Modify SYSFS to specify the full path, and pass it down for the extras
builds.

Change the scsi_id Makefile so it will work with and without udev.
2005-04-26 22:02:45 -07:00
greg@kroah.com
c008fe93f5 [PATCH] fix up error in building extras and libsysfs 2005-04-26 21:58:15 -07:00
greg@kroah.com
71144b744a [PATCH] delete extras/multipath-tools as per the author's request
This is now a standalone package.
2005-04-26 21:37:03 -07:00
kay.sievers@vrfy.org
33eae955e2 [PATCH] update volume_id
Here is an update to the latest volume_id which fixes a few bugs with
FAT volumes.
2005-04-26 21:37:03 -07:00
harald@redhat.com
ff213aecf6 [PATCH] cleanup PATCH for extras/chassis_id/Makefile
for "make install"
2005-04-26 21:37:02 -07:00
greg@kroah.com
186f7b2362 [PATCH] update comments in scsi-devfs.sh 2005-04-26 21:37:02 -07:00
patmans@us.ibm.com
01f950e2eb [PATCH] update udev to include scsi_id 0.6
Here's a patch updating udev's copy of scsi_id to version 0.6.
2005-04-26 21:37:02 -07:00
kay.sievers@vrfy.org
9e8a3a095d [PATCH] volume-id build fix and update
Let's try it another way:

We define BLKGETSIZE64 in udev-volume_id.c now, cause including <fs.h>
does also not work with klibc. This hopefully fixes your compile problem
too.

Also included is an update to udev_volume_id with the latest fixes for
volume_id. It adds a simple logging file to map the debug function, that
we can use exactly the same files in HAL and udev.
2005-04-26 21:37:01 -07:00
kay.sievers@vrfy.org
c506c4087e [PATCH] update udev_volume_id
Here is an update for the volume_id callout to catch up to the latest
and greatest:

o It is able to skip the label reading of linux raid members, which are
  otherwise recognized as a normal filesystem.

o It reads FAT labels stored in the directory instead of the
  superblock (Windows only writes in the directory).

o The NTFS uuid is the right one now.

o It reads all the Apple HFS(+) formats with the labels.

o UFS volumes are recognized but no labels are extracted.

o We use CFLAGS+=-D_FILE_OFFSET_BITS=64 instead of lsee64() which may fix
  a bug mentioned on the klibc mailing list.

A lot of other new features are only used in HAL and not needed in this
simple callout. But if someone stumbles over it and want's to send a patch
for some exotic formats, we better keep it up to date :)
2005-04-26 21:37:00 -07:00
tao@kernel.org
b9e3301c3b [PATCH] Minor POSIX-fixes for udev
The attached patch contains a few patches against udev, to remove
use of various XSI:isms and bash:isms, and to change two scripts form
/bin/bash to /bin/sh.  None of the bash-scripts in test/ uses any
bash-specific functions as far as I know, but I didn't touch them since
they aren't used runtime.

Rationale:
* Both of the /bin/bash-scripts are totally free from bashisms, hence they
  don't need to be /bin/bash; using /bin/sh instead helps (mainly)
  embedded-people

* local and source are bash:isms (well, they exist in several other
  shells as well, but they aren't part of POSIX or any of its extensions)

* -a in tests is an XSI-extension, not part of strict POSIX, and is
  easily replaced by &&
  | http://www.opengroup.org/onlinepubs/009695399/utilities/test.html

* Use of fgrep is deprecated in POSIX in favour of grep -F (though fgrep
  will remain in use for a long time...)
  | http://www.opengroup.org/onlinepubs/009695399/utilities/grep.html

The fgrep-change isn't really necessary, since fgrep can always be
implemented as a shell-script, but the rest of the changes would really
be appreciated.
2005-04-26 21:36:59 -07:00
trini@kernel.crashing.org
a4f5eb034b [PATCH] clean up start_udev a bit
First, update extras/start_udev.  udevstart always internally set
UDEV_NO_SLEEP as well as setting the ACTION variable, so that only needs
to be done in the run_udev script case.

Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2005-04-26 21:36:59 -07:00
kay.sievers@vrfy.org
b99f344fde [PATCH] update udev_volume_id
volume_id is now able to read NTFS labels. Not very exciting, but we
keep up to date with the version in HAL. Also __packed__ was needed for
the structs, cause the gcc 3.4 compiled version was no longer working
properly.
2005-04-26 21:36:21 -07:00
patmans@us.ibm.com
062db23d5e [PATCH] update udev scsi_id to scsi_id 0.5
This patch syncs the scsi_id in the udev tree to version 0.5.
2005-04-26 21:36:21 -07:00
atul.sabharwal@intel.com
c5d046b6c7 [PATCH] Patch for chassis_id exras module 2005-04-26 21:36:21 -07:00
greg@kroah.com
bd2598afb6 [PATCH] delete udev_selinux as it doesn't work properly and is the wrong way to do it... 2005-04-26 21:35:17 -07:00
greg@kroah.com
d7a4f62d3d [PATCH] Deleted the udev_dbus extra as it didn't really work properly and HAL has a real solution now. 2005-04-26 21:35:17 -07:00
kay.sievers@vrfy.org
cde5a756ce [PATCH] udev_volume_id update
Here is a update to extras/volume_id/*

o The device is now specified by the DEVPATH in the environment,
  it's no longer needed to pass the major/minor to the callout.

o leading spaces and slashes are now removed from the returned string
  and spaces are replaced by underscore, to not to confuse udev.

o Arnd Bergmann <arnd@arndb.de> provided the code to recognize s390
  dasd disk labels. The -d switch tries to read the main block device
  instead of the partition.
2005-04-26 21:35:17 -07:00
kay.sievers@vrfy.org
599b626127 [PATCH] udev callout for reading filesystem labels
On Fri, Apr 30, 2004 at 03:29:54PM -0700, Greg KH wrote:
> On Thu, Apr 29, 2004 at 11:04:46PM +0200, Kay Sievers wrote:
> > Hi,
> > here is a small udev toy, which enables udev to name partitions by
> > its filesystem label or uuid's.
> >
> > The following udev rule:
> >
> >   KERNEL="sd*", PROGRAM="/sbin/udev_volume_id -M%M -m%m -u", SYMLINK="%c"
> >
> > creates a symlink with the uuid read from the filesystem. If no label or
> > uuid is found the program exits with nonzero and the rule will fail.
> >
> > ext2, ext3, reiserfs, xfs, jfs, vfat, msdos volume labels are supported,
> > ntfs and swap partitions can be recognized.
> >
> > It's possible to compile with klibc and the static binary takes 13kb.
>
> Very nice, I was wondering who was going to use that library to make
> such a tool.  This is even better as we can use klibc for it.

Here is a update, which supports iso9660 and udf labels.
Not very useful in the udev case, but I've added it for hal,
so we just catch up with the latest version.
2005-04-26 21:35:17 -07:00
kay.sievers@vrfy.org
3611d5820c [PATCH] udev callout for reading filesystem labels
here is a small udev toy, which enables udev to name partitions by
its filesystem label or uuid's.

The following udev rule:

  KERNEL="sd*", PROGRAM="/sbin/udev_volume_id -M%M -m%m -u", SYMLINK="%c"

creates a symlink with the uuid read from the filesystem. If no label or
uuid is found the program exits with nonzero and the rule will fail.

ext2, ext3, reiserfs, xfs, jfs, vfat, msdos volume labels are supported,
ntfs and swap partitions can be recognized.

It's possible to compile with klibc and the static binary takes 13kb.
2005-04-26 21:35:17 -07:00
kay.sievers@vrfy.org
b2983b9d4a [PATCH] udev_selinux changes
Here is the fix for extras/seliux/*
 o install the binary in /sbin/
 o add symlink to /etc/dev.d/ with suffix .dev
 o removed the undefined udev_log variable
 o fixed compiler warnings
2005-04-26 21:35:15 -07:00
md@Linux.IT
af5b5178fa [PATCH] devfs.sh-ide-floppy 2005-04-26 21:35:15 -07:00
kay.sievers@vrfy.org
eab52c2443 [PATCH] udev_dbus changes
On Sun, Apr 11, 2004 at 03:51:07AM +0200, Kay Sievers wrote:
> Here we change extras/dbus/* to
>   o install the binary in /etc/dev.d
>   o append .dev to the binary
>   o add David's copyright
>   o add the listener script to watch the sent dbus messages
>   o removed the undefined udev_log variable
>   o switch printf() to dbg()

Here we install the binary in /usr/sbin/ and symlink it to
/etc/dev.d/ with the .dev suffix.
2005-04-26 21:35:15 -07:00
sjoerd@spring.luon.net
4b06c852cb [PATCH] DEVNODE -> DEVNAME transition fixes
It seems that the transition from DEVNODE to DEVNAME wasn't done
  everywhere. This broke udev_dbus for me.

  Attached patch does the transition in the places it wasn't done yet.
2005-04-26 21:35:15 -07:00
atul.sabharwal@intel.com
c1f8ea9562 [PATCH] Add README for chassis_id 2005-04-26 21:35:13 -07:00
greg@kroah.com
0bcdc8498c [PATCH] clean up chassis_id coding style. 2005-04-26 21:35:13 -07:00
atul.sabharwal@intel.com
fa5acd760d [PATCH] Add chassis_id program to extras directory 2005-04-26 21:35:13 -07:00
md@Linux.IT
c2818554ce [PATCH] small ide-devfs.sh fix
The file may not exist and errors would be spewed on the console.
2005-04-26 21:35:12 -07:00
greg@kroah.com
0384e43ad9 [PATCH] move udev_selinux into extras/selinux 2005-04-26 21:35:11 -07:00
greg@kroah.com
357f44a534 [PATCH] move udev_dbus to extras/dbus
Should build now, but might have linking problems.
2005-04-26 21:35:11 -07:00
rgooch@ras.ucalgary.ca
c641a99c6f [PATCH] SCSI logical and physical names for udev
Hi, Greg. Appended is scsi-devfs.sh, a script for udev to implement
devfs-style names for SCSI hard discs, CD-ROM's and generic devices.
This has been tested with both hard discs and CD-ROM's. The SCSI
generic support should be OK for when there is sysfs/udev support for
SCSI generic devices. SCSI tapes are not yet implemented because I
don't have one to test with.

In addition, this script supports physical names, based on PCI bus
location, both longhand (/udev/bus/pci/...) and shorthand
(/udev/sd/pci/*).
2005-04-26 21:35:10 -07:00
olh@suse.de
2761f9b951 [PATCH] make spotless
klibc has a target make spotless, this patch makes it possible to clean
the whole udev tree and start from scratch.
2005-04-26 21:35:10 -07:00
greg@kroah.com
a3b37a073d [PATCH] Added multipath-tools 0.1.1 release 2005-04-26 21:35:09 -07:00
greg@kroah.com
49f9acf384 [PATCH] deleted current extras/multipath directory 2005-04-26 21:35:09 -07:00
greg@kroah.com
27abdb46ff [PATCH] make start_udev use udevstart binary 2005-04-26 21:35:07 -07:00
christophe.varoqui@free.fr
cbd2ea21e4 [PATCH] multipath update 2005-04-26 21:35:06 -07:00
md@Linux.IT
b7b6562729 [PATCH] remove usage of expr in ide-devfs.sh
fix_expr: remove usage of expr in ide-devfs.sh, because it may be in
/usr/bin and not available at early boot time.
2005-04-26 21:35:06 -07:00
patmans@us.ibm.com
b484e43622 [PATCH] update udev scsi_id to scsi_id 0.4
This patch syncs the scsi_id in the udev tree to version 0.4.
2005-04-26 21:34:28 -07:00
greg@kroah.com
286903679a [PATCH] remove udevd priority TODO item, as it's not needed at all.
We want to be started by keventd, as that runs at a very fast priority.
2005-04-26 21:32:29 -07:00
greg@kroah.com
7fdc5cb445 [PATCH] more HOWTO cleanups. 2005-04-26 21:32:29 -07:00
patmans@us.ibm.com
0bad3406c1 [PATCH] udev use new libsysfs header file location
Use the new location of libsysfs header files.
2005-04-26 21:32:29 -07:00
greg@kroah.com
2152332ea7 [PATCH] add start_udev init script. 2005-04-26 21:32:29 -07:00
ext.devoteam.varoqui@sncf.fr
f01f8c6677 [PATCH] update extras/multipath
patch follows :

        * remove the restrictive -f flag.
          Introduce a more generic "-m iopolicy" one.
        * remove useless "int with_sysfs" in env struct
2005-04-26 21:32:28 -07:00
kay.sievers@vrfy.org
88f09368b3 [PATCH] udev - switch callout part selector to {attribute}
Here we change the magic callout part number selector to the new
atribute syntax. The syntax to select the second part of the callout string:

 '%2c' is now '%c{2}'

I think it's more clear and we no longer misuse the length argument.

The old syntax is still supported, but we should remove it some
time in the future.
2005-04-26 21:32:28 -07:00
christophe.varoqui@free.fr
09b7985cf6 [PATCH] more udev-016/extras/multipath
incremental to udev-016/extras/multipath-0.0.16.3,

        * add a GROUP_BY_SERIAL flag. This should be useful for
          controlers that activate their spare paths on simple IO
          submition with a penalty. The StorageWorks HW defaults to
          this mode, even if the MULTIBUS mode is OK.
        * remove unused sg_err.c
        * big restructuring : split devinfo.c from main.c. Export :
                * void basename (char *, char *);
                * int get_serial (int, char *);
                * int get_lun_strings (char *, char *, char *, char *);
                * int get_evpd_wwid(char *, char *);
                * long get_disk_size (char *);
          Now we see clearly what is expected from an external package
          like scsi_id.
        * stop passing struct env as param
2005-04-26 21:32:27 -07:00
christophe.varoqui@free.fr
cbb576b91d [PATCH] more udev-016/extras/multipath
> Hello,
>
> incremental to udev-016/extras/multipath,
>
> * don't rely on the linux symlink in the udev/klibc dir since
>   udev build doesn't use it anymore. This corrects build breakage
> * remove make_dm_node fn & call. Rely on udev for this.
>
> The first patch is to be applied.
> The second is conditioned by udev dealing correctly with devmap names.
>
> For this I can suggest a CALLOUT rule like this :
> KERNEL="dm-[0-9]*", PROGRAM="/tmp/name_devmap %M %m", NAME="%k",
> SYMLINK="%c"
>
> With name_devmap like :
> #!/bin/sh
> /usr/sbin/dmsetup ls|/bin/grep "$1, $2"|/usr/bin/awk '{print $1}'
>

ok I coded the suggested tool.
it works with the following rule :
KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"

I don't know if it's right to keep this tools packaged with multipath because
it's widely more general.

Maybe Joe should merge it in the device-mapper package or provide the
functionnality through dmsetup ?
2005-04-26 21:32:27 -07:00
christophe.varoqui@free.fr
aca29aa51f [PATCH] update extras/multipath
incremental to udev-016/extras/multipath,

* don't rely on the linux symlink in the udev/klibc dir since
  udev build doesn't use it anymore. This corrects build breakage
* remove make_dm_node fn & call. Rely on udev for this.

The first patch is to be applied.
The second is conditioned by udev dealing correctly with devmap names.

For this I can suggest a CALLOUT rule like this :
KERNEL=3D"dm-[0-9]*", PROGRAM=3D"/tmp/name_devmap %M %m", NAME=3D"%k", SY=
MLINK=3D"%c"

With name_devmap like :
#!/bin/sh
/usr/sbin/dmsetup ls|/bin/grep "$1, $2"|/usr/bin/awk '{print $1}'
2005-04-26 21:32:25 -07:00
greg@kroah.com
977083c253 [PATCH] add KERNEL_DIR option so that the distros will be happy
Based on a patch from Svetoslav Slavtchev <svetljo@gmx.de>
2005-04-26 21:32:25 -07:00
elkropac@students.zcu.cz
c7e2a0bc08 [PATCH] get_dev_number() in extras/ide-devfs.sh
this patch corrects ide devices with number greater than 9 being linked
into wrong discs/discX directories (my hda10 device was in discs/disc1
directory)
it adds % into pattern for $DRIVE, so for example, hda10 is not eaten
to hda1, but to hda, and break in for cycle works for it
2005-04-26 21:32:24 -07:00
greg@kroah.com
869fc2f1ff [PATCH] move udevinfo into the main build and clean up the main Makefile a bit. 2005-04-26 21:13:18 -07:00
kay.sievers@vrfy.org
87171e46cd [PATCH] udevinfo - now a real program :)
I want to make udevinfo the standard query interface, so all the user
features of the main udev are copied in here. It is now capable to:

  o query the database for a given value
  o dump the whole database
  o extract all possible device attributes for a sysfs_device


In addition to the known options of udev it supports the query for the
mode of the device node, and it includes the mode in the database dump:

  udevinfo -d
  P: /class/video4linux/video0
  N: video/webcam0
  M: 0666
  S: camera0 kamera0
  O: 500
  G: 500


It is also a bit more friendly with the pathnames specified for devices or nodes.
We remove the absolute path or add it if neccessary:

  udevinfo -q mode -n video/webcam0
  udevinfo -q mode -n /udev/video/webcam0
  0666

  udevinfo -q mode -p /sys/class/video4linux/video0
  udevinfo -q mode -p /class/video4linux/video0
  udevinfo -q mode -p class/video4linux/video0
  0666
2005-04-26 21:13:18 -07:00
kay.sievers@vrfy.org
034f35d7e6 [PATCH] udev - udevinfo with device chain walk
udevinfo is now capable to print "all" attributes along the device chain
of a sysfs device. Just like udev itself it walks the chain upwards and
prints all usable attributes in the udev key format.
So it should be easy to find unique attributes to compose a rule.

All multiline attribute values and values containing non printable
characters are skipped now. I hope nothing useful gets lost with this :)

NOTE:
  The BUS value corresponding with the attributes is printed for every
  device. Don't specify BUS= in a rule and mix SYSFS_attributes from
  different busses, the rule can't match.



./udevinfo /sys/block/sda/sda1

device '/sys/block/sda/sda1' has major:minor 8:1
  looking at class device '/sys/block/sda/sda1':
    SYSFS_dev="8:1"
    SYSFS_start="32"
    SYSFS_size="160"
    SYSFS_stat="       0        0        0        0"

follow the class device's "device"
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.3/1-1.3:1.0/host32/32:0:0:0':
    BUS="scsi"
    ID="32:0:0:0"
    SYSFS_detach_state="0"
    SYSFS_type="0"
    SYSFS_model="USB 2 HS-CF"
    SYSFS_vendor="SMSC    "
    SYSFS_max_sectors="240"
    SYSFS_device_blocked="0"
    SYSFS_queue_depth="1"
    SYSFS_scsi_level="3"
    SYSFS_rev="1.25"
    SYSFS_online="1"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.3/1-1.3:1.0/host32':
    BUS=""
    ID="host32"
    SYSFS_detach_state="0"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.3/1-1.3:1.0':
    BUS="usb"
    ID="1-1.3:1.0"
    SYSFS_detach_state="0"
    SYSFS_bInterfaceNumber="00"
    SYSFS_bAlternateSetting=" 0"
    SYSFS_bNumEndpoints="02"
    SYSFS_bInterfaceClass="08"
    SYSFS_bInterfaceSubClass="06"
    SYSFS_bInterfaceProtocol="50"
    SYSFS_iInterface="00"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.3':
    BUS="usb"
    ID="1-1.3"
    SYSFS_detach_state="0"
    SYSFS_bNumConfigurations="1"
    SYSFS_bNumInterfaces=" 1"
    SYSFS_bConfigurationValue="1"
    SYSFS_bmAttributes="80"
    SYSFS_bMaxPower=" 96mA"
    SYSFS_idVendor="0424"
    SYSFS_idProduct="20fc"
    SYSFS_bcdDevice="0125"
    SYSFS_bDeviceClass="00"
    SYSFS_bDeviceSubClass="00"
    SYSFS_bDeviceProtocol="00"
    SYSFS_speed="12"
    SYSFS_manufacturer="SMSC"
    SYSFS_product="USB 2 Flash Media Device"
    SYSFS_serial="0305037000C2"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1':
    BUS="usb"
    ID="1-1"
    SYSFS_detach_state="0"
    SYSFS_bNumConfigurations="1"
    SYSFS_bNumInterfaces=" 1"
    SYSFS_bConfigurationValue="1"
    SYSFS_bmAttributes="e0"
    SYSFS_bMaxPower=" 64mA"
    SYSFS_idVendor="03eb"
    SYSFS_idProduct="3301"
    SYSFS_bcdDevice="0300"
    SYSFS_bDeviceClass="09"
    SYSFS_bDeviceSubClass="00"
    SYSFS_bDeviceProtocol="00"
    SYSFS_speed="12"
    SYSFS_product="Standard USB Hub"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1':
    BUS="usb"
    ID="usb1"
    SYSFS_detach_state="0"
    SYSFS_bNumConfigurations="1"
    SYSFS_bNumInterfaces=" 1"
    SYSFS_bConfigurationValue="1"
    SYSFS_bmAttributes="40"
    SYSFS_bMaxPower="  0mA"
    SYSFS_idVendor="0000"
    SYSFS_idProduct="0000"
    SYSFS_bcdDevice="0206"
    SYSFS_bDeviceClass="09"
    SYSFS_bDeviceSubClass="00"
    SYSFS_bDeviceProtocol="00"
    SYSFS_speed="12"
    SYSFS_manufacturer="Linux 2.6.2-rc1-p4 uhci_hcd"
    SYSFS_product="UHCI Host Controller"
    SYSFS_serial="0000:00:1d.0"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0':
    BUS="pci"
    ID="0000:00:1d.0"
    SYSFS_detach_state="0"
    SYSFS_vendor="0x8086"
    SYSFS_device="0x2482"
    SYSFS_subsystem_vendor="0x1014"
    SYSFS_subsystem_device="0x0220"
    SYSFS_class="0x0c0300"
    SYSFS_irq="9"

  looking at the device chain at '/sys/devices/pci0000:00':
    BUS=""
    ID="pci0000:00"
    SYSFS_detach_state="0"
2005-04-26 21:13:18 -07:00
christophe.varoqui@free.fr
069bd53012 [PATCH] udev-013/extras/multipath update
incremental to 0.0.13,

* update the DM target synthax to the 2.6.0-udm5 style
* update the changelog and the doc to reflect minimal requirements
2005-04-26 21:13:17 -07:00
kay.sievers@vrfy.org
be9b51f663 [PATCH] udev - program to query all device attributes to build a rule
On Sun, Jan 18, 2004 at 07:30:50AM +0100, Kay Sievers wrote:
> Hi,
> here is a small program to query all attributes of a device and
> print these in the udev key format. It may help to get the keys to
> define a rule.

Fixed a typo - the sysfs_device is right now.

USB FLash Reader:
    kay@pim:~/src/udev.kay$ extras/udevinfo/udevinfo /sys/block/sda/sda1

    device '/sys/block/sda/sda1' has major:minor 8:1

    looking at class device '/sys/block/sda/sda1':
      SYSFS_dev="8:1"
      SYSFS_start="32"
      SYSFS_size="160"
      SYSFS_stat="       0        0        0        0"

    follow class device's "device" link '/sys/block/sda':
      BUS="scsi"
      ID="57:0:0:0"
      SYSFS_detach_state="0"
      SYSFS_type="0"
      SYSFS_device_blocked="0"
      SYSFS_queue_depth="1"
      SYSFS_scsi_level="3"
      SYSFS_vendor="SMSC    "
      SYSFS_model="USB 2 HS-CF"
      SYSFS_rev="1.25"
      SYSFS_online="1"
2005-04-26 21:13:17 -07:00
patmans@us.ibm.com
e996d97835 [PATCH] update udev scsi_id to scsi_id 0.3 2005-04-26 21:13:17 -07:00
kay.sievers@vrfy.org
33084f1e2a [PATCH] udev - small script optimization
Optimize the scripts reflecting the now more powerful rule logic,
cause we can combine all known fields now in any order:

  The ide-devfs.sh is only executed if the kernel name matches with 'hd*':

    BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%1c %2c"

  The name_cdrom.pl is only executed for ide and scsi devices, but not for a partition.
  It exits with nonzero to skip the rule if the CD is not found:

    KERNEL="[hs]d[a-z]", PROGRAM="name_cdrom.pl %M %m", NAME="%1c", SYMLINK="cdrom"
2005-04-26 21:13:16 -07:00
kay.sievers@vrfy.org
7e5f7397f9 [PATCH] udev - CALLOUT is PROGRAM now
replace CALLOUT by PROGRAM and fix old rule format
2005-04-26 21:13:16 -07:00
eike-hotplug@sf-tec.de
e64280b8b3 [PATCH] LSB init script and other stuff
I had too much time during the holidays, so I played a bit with udev. The
changes are like last time mostly on the init stuff. I'm sending you this as
a great diff which is just for comments.

What it does:
-fix a typo in Makefile
-use only one "grep -v" instead of many
-don't include BK-Files into release (shrinks the stuff to 30%!)
-add a new init script which is LSB compliant
-add some flags to choose which one to use
-use /etc/udev/udev.conf in Redhat init script as the source for the udev
directory. If this is not done then the init script may create a directory
which udev itself isn't using (I changed /udev to /Udev to avoid collisions
with /usr and ran into this)
-first check for sysfs_dir before creating udev_root (maybe someone else has
already fixed this, I saw this discussion on lkml)
2005-04-26 21:13:15 -07:00
kay.sievers@vrfy.org
d6e86b3752 [PATCH] fix Silly udev script
Hey, this is funny.
I couldn't resist to give it a try and we need a few changes:

  - it's %2c otherwise nearly all my CD's are "good", but sure I also have bad ones :)
  - remove the node first, cause get_cddb() dies and leaves the old one there
  - remove spaces in name, cause this is our separator

/udev/
|-- The_Cure-The_Peel_Sessions
|-- cdrom -> ./The_Cure-The_Peel_Sessions
|-- hda
|-- hda1
|-- hda2
|-- hda4
2005-04-26 21:13:14 -07:00
greg@kroah.com
a05b77509e [PATCH] add silly script that names cdrom drives based on the cd in them. 2005-04-26 21:13:14 -07:00
christophe.varoqui@free.fr
b02d14d0a6 [PATCH] extras multipath update
incremental to 0.0.12-1,

* check hotplug event refers to a block device; if not exit early
2005-04-26 21:13:12 -07:00
christophe.varoqui@free.fr
9107fb88ba [PATCH] extras multipath update
2003-12-29 multipath-012
        * refresh doc
        * add the uninstall target in Makefile
        * /sbin/multipath, not /root/multipath in hotplug agent
2005-04-26 21:13:12 -07:00
kay.sievers@vrfy.org
bbc1c767b2 [PATCH] ide-devfs.sh update
Attached is a patch for ide-devfs.sh,
The script is merged with the one from Martin Schlemmer, and cleaned up
by him, to create both types of symlinks with one single rule:

  CALLOUT, BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c %3c"


/udev/
|-- cdroms
|   `-- cdrom0 -> ../hdc
|-- discs
|   |-- disc0
|   |   |-- disc -> ../../hda
|   |   |-- part1 -> ../../hda1
|   |   |-- part2 -> ../../hda2
|   |   `-- part4 -> ../../hda4
|   |-- disc1
|   |   |-- disc -> ../../hdb
|   |   `-- part1 -> ../../hdb1
|   `-- disc2
|       |-- disc -> ../../hde
|       `-- part1 -> ../../hde1
|-- hda
|-- hda1
|-- hda2
|-- hda4
|-- hdb
|-- hdb1
|-- hdc
|-- hde
|-- hde1
`-- ide
    |-- host0
    |   |-- bus0
    |   |   |-- target0
    |   |   |   `-- lun0
    |   |   |       |-- disc -> ../../../../../hda
    |   |   |       |-- part1 -> ../../../../../hda1
    |   |   |       |-- part2 -> ../../../../../hda2
    |   |   |       `-- part4 -> ../../../../../hda4
    |   |   `-- target1
    |   |       `-- lun0
    |   |           |-- disc -> ../../../../../hdb
    |   |           `-- part1 -> ../../../../../hdb1
    |   `-- bus1
    |       `-- target0
    |           `-- lun0
    |               `-- cd -> ../../../../../hdc
    `-- host2
        `-- bus0
            `-- target0
                `-- lun0
                    |-- disc -> ../../../../../hde
                    `-- part1 -> ../../../../../hde1
2005-04-26 21:13:12 -07:00
christophe.varoqui@free.fr
01ff79f589 [PATCH] extras multipath update
incremental to 20031222-2,

 2003-12-22 multipath-010
        * tweak the install target in Makefile
        * stop passing fds as argument : this change enable a strict
          segregation of ugly 2.4 code
        * sysfs version of get_lun_strings()
        * be careful about the return of get_unique_id() since errors
          formerly caught up by if(open()) in the caller fn are now returned
          by get_unique_id()
        * send get_serial() in unused.c
2005-04-26 21:13:10 -07:00
christophe.varoqui@free.fr
88bca8484d [PATCH] extras multipath update
incremental to 20031222,

 2003-12-22 multipath-010
        * introduce dm-simplecmd for RESUME & SUSPEND requests
        * split add_map() in setup_map() & dm-addmap()
        * setup_map() correctly submits "SUSPEND-RELOAD-RESUME or CREATE"
          sequences instead of the bogus "RELOAD or CREATE"
2005-04-26 21:13:10 -07:00