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

400 Commits

Author SHA1 Message Date
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
christophe.varoqui@free.fr
4081da7fe5 [PATCH] extras multipath update
incremental to 20031220,

 2003-12-22 multipath-010
        * don't print .sg_dev if equal to .dev (2.6) in print_path()
        * since the kernel code handles defective paths, remove all
          code to cope with them :
                * move do_tur() to unused.c
                * remove .state from path struct
                * remove .state settings & conditionals
        * add a cmdline switch to force maps to failover mode,
          ie 1 path per priority group
        * add default policies to the whitelist array (spread io ==
          MULTIBUS / io forced to 1 path == FAILOVER)
        * move get_disk_size() call out of add_map() to coalesce()
        * comment tricky coalesce() fn
        * bogus unsused.c file renamed to unused.c
2005-04-26 21:13:10 -07:00
christophe.varoqui@free.fr
176857119a [PATCH] extras multipath update
An important one, against stock udev-009 :

 2003-12-20 multipath-010
        * big ChangeLog update
        * start to give a little control over target params :
          introduce cmdline arg -i to control polling interval
        * cope with hotplug-style calling convention :
          ie "multipath scsi $DEVPATH" ... to avoid messing with
          online maps not concerned by an event
        * example hotplug agent to drop in /etc/hotplug.d/scsi
        * revert the run & resched patch : unless someone proves me
          wrong, this was overdesigned
        * move commented out functions in unused.c
        * update multipath target params to "udm[23] style"
        * mp target now supports nr_path == 1, so do we
        * add gratuitous free()
        * push version forward
2005-04-26 21:13:10 -07:00
kay.sievers@vrfy.org
4af58c7057 [PATCH] experimental CALLOUT script for devfs ide node creation with cd, disc, part
Here is a experimental CALLOUT script for udev to create devfs nodes
for IDE-devices. Not that I need these, I just wanted to see if it works :)

The script is really stupid, no error handling, nothing more than
absolutely needed. The rule uses the 'k' format char of the previous
patch. The %D is not used, so the user can have disc or disk :)

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

creates the following on my machine with two hard disks, one DVD and a PCMCIA-compact-flash inserted:
  /udev
  |-- 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:09 -07:00
dsteklof@us.ibm.com
bcbe2d8e7d [PATCH] libsysfs 0.4.0 patch
Ananth released sysfsutils 0.4.0 last night, I'm sure you saw the email.
Here's a patch with the latest changes from the pre-patch I already
gave you. It includes sysfs_get_device_parent(), which you said you
needed. I've run your test scripts and I've built scsi_id. Please
play around with this and check it out.

There are quite a few changes. Please do not access
structure pointers, like sysfs_device's parent, directly like
dev->parent. Please use the "get" function to retrieve. The functions
load things on demand and refresh views under the covers.
2005-04-26 21:13:09 -07:00
dsteklof@us.ibm.com
ff3633bf9d [PATCH] fix scsi_id segfault with udev-009
Scsi_id hasn't been changed to use the latest libsysfs changes. The
"directory" in the sysfs_class_device is now considered "private" and only
should be accessed using functions. Treating the structures as handles lets
us only load information when it's needed, reducing caching or stale
information and also helping performance.

Here's the problem.

static inline char *sysfs_get_attr(struct sysfs_class_device *dev,
                                    const char *attr)
{
        return sysfs_get_value_from_attributes(dev->directory->attributes,
                                               attr);
}

Please try this quick fix:
2005-04-26 21:13:09 -07:00
christophe.varoqui@free.fr
9e919aa4f0 [PATCH] more extras/multipath changes
* Make the HW-specific get_unique_id switch pretty
* Prepare to field-test by whitelisting all known fibre array, try to
fetch WWID from the standard EVPD 0x83 off 8 for everyone ... we will
learn from feedback :)

Could you drop a note with the udev-009 release-notes asking for testing
this WWID fetching thing ?
2005-04-26 21:13:08 -07:00
christophe.varoqui@free.fr
197a978ea3 [PATCH] and more extras/multipath updates
* configure the multipath target with round-robin path selector and
conservative default for a start : yes it makes this release the first
really useful one.
* temporarily disable map creation for single path device due to current
restrictive defaults in the kernel target. Sistina should work it out.
* correct the strncmp logic in blacklist function.

Tested on StorageWorks with 2.6.0-test10-udm1 :

xa-s03:~# ./multipath -v
60001fe1000bdad0000903507109004b (1 0 1 1) /dev/sda op:1 /dev/sda
[HSG80           ]
60001fe1000bdad000090371312100bf (1 0 1 2) /dev/sdb op:1 /dev/sdb
[HSG80           ]
60001fe1000bdad000090371312100c2 (1 0 1 3) /dev/sdc op:1 /dev/sdc
[HSG80           ]
60001fe1000bdad00009037131210067 (1 0 2 1) /dev/sdd op:1 /dev/sdd
[HSG80           ]
60001fe1000bdad000090371312100b3 (1 0 2 2) /dev/sde op:1 /dev/sde
[HSG80           ]
60001fe1000bdad00009035071090024 (1 0 2 3) /dev/sdf op:1 /dev/sdf
[HSG80           ]
600508b4000156d700012000000b0000 (1 0 3 1) /dev/sdg op:1 /dev/sdg
[HSV110 (C)COMPAQ]
600508b4000156c30001200000210000 (1 0 3 2) /dev/sdh op:1 /dev/sdh
[HSV110 (C)COMPAQ]
600508b4000156d700012000000b0000 (1 0 6 1) /dev/sdi op:1 /dev/sdi
[HSV110 (C)COMPAQ]
600508b4000156c30001200000210000 (1 0 6 2) /dev/sdj op:1 /dev/sdj
[HSV110 (C)COMPAQ]

60001fe1000bdad0000903507109004b
 \_(1 0 1 1) /dev/sda op:1 /dev/sda [HSG80           ]
60001fe1000bdad000090371312100bf
 \_(1 0 1 2) /dev/sdb op:1 /dev/sdb [HSG80           ]
60001fe1000bdad000090371312100c2
 \_(1 0 1 3) /dev/sdc op:1 /dev/sdc [HSG80           ]
60001fe1000bdad00009037131210067
 \_(1 0 2 1) /dev/sdd op:1 /dev/sdd [HSG80           ]
60001fe1000bdad000090371312100b3
 \_(1 0 2 2) /dev/sde op:1 /dev/sde [HSG80           ]
60001fe1000bdad00009035071090024
 \_(1 0 2 3) /dev/sdf op:1 /dev/sdf [HSG80           ]
600508b4000156d700012000000b0000
 \_(1 0 3 1) /dev/sdg op:1 /dev/sdg [HSV110 (C)COMPAQ]
 \_(1 0 6 1) /dev/sdi op:1 /dev/sdi [HSV110 (C)COMPAQ]
600508b4000156c30001200000210000
 \_(1 0 3 2) /dev/sdh op:1 /dev/sdh [HSV110 (C)COMPAQ]
 \_(1 0 6 2) /dev/sdj op:1 /dev/sdj [HSV110 (C)COMPAQ]

N|600508b4000156d700012000000b0000 : 0 4194304 multipath 2 2 10
round-robin 2 /dev/sdg 10 2 1 2 /dev/sdi 10 2 1 2
N|600508b4000156c30001200000210000 : 0 20971520 multipath 2 2 10
round-robin 2 /dev/sdh 10 2 1 2 /dev/sdj 10 2 1 2
xa-s03:~# dmsetup ls
600508b4000156c30001200000210000        (254, 1)
600508b4000156d700012000000b0000        (254, 0)
xa-s03:~# ll /dev/mapper/
total 0
brw-------    1 root     root     254,   1 Dec  9 22:57
600508b4000156c30001200000210000
brw-------    1 root     root     254,   0 Dec  9 22:57
600508b4000156d700012000000b0000
crw-------    1 root     root      10,  63 Jul 25 22:48 control
xa-s03:~# dd if=/dev/mapper/600508b4000156c30001200000210000
of=/dev/null bs=1M count=500
500+0 records in
500+0 records out
524288000 bytes transferred in 5.662530 seconds (92589003 bytes/sec)

gee, that pretty fast :)
2005-04-26 21:13:07 -07:00
christophe.varoqui@free.fr
61f76f5c9c [PATCH] more extras/multipath updates
* update the Makefiles to autodetect libgcc.a & gcc includes
"ulibc-style". Factorisation of udevdirs & others niceties
* drop a hint about absent /dev/sd? on failed open() for poor Debian
users who don't imagine their favorite distro with only 16 preconfigured
SCSI device nodes :)
2005-04-26 21:13:07 -07:00
patmans@us.ibm.com
1bed1db499 [PATCH] update udev extras/scsi_id to version 0.2
This patch updates scsi_id under udev from version 0.1 to version 0.2.
2005-04-26 21:13:06 -07:00
christophe.varoqui@free.fr
a652254ddb [PATCH] yet more extras/multipath
* implement a reschedule flag in /var/run. Last thing the prog do before
exit is check if a call to multipath was done (but canceled by
/var/run/multipath.run check) during its execution. If so restart the
main loop.
* implement a blacklist of sysfs bdev to not bother with for now (hd,
md, dm, sr, scd, ram, raw). This avoid sending SG_IO to unappropiate
devices.

Compiles & survive "while true;do (./multipath -v &);done"
2005-04-26 21:13:06 -07:00
christophe.varoqui@free.fr
d877515791 [PATCH] more extras/multipath updates
* Adds a /var/run/multipath.run handling to avoid simultaneous runs.
* Remove a commented-out "printf"
2005-04-26 21:13:06 -07:00
christophe.varoqui@free.fr
2bf80b67d1 [PATCH] extras/multipath update
here is the next update which brings this multipath to the state i'm not
ashamed of it being in udev :)

* drop a libdevmapper copy in extras/multipath; maybe discussions w/
Sistina folks will bring a better solution in the future.
* drop a putchar usage in libdevmapper to compile cleanly with klibc
* drop another such usage of my own in main.c
* massage the Makefile to compile libdevmapper against klibc
* use "ld" to produce the binary rather than "gcc -static"
* stop being stupid w/ uneeded major, minor & dev in main.c:dm_mk_node()
* reverse to creating striped target for now because the multipath
target is more hairy than expected initialy
* push the version code to 009 to be in synch w/ udev

builds & run here.
binary size is 43ko, which is fairly gratifying after all the efforts
I've put to compiling it with klibc :)
2005-04-26 21:13:06 -07:00
christophe.varoqui@free.fr
359618cd6e [PATCH] udev-007/extras/multipath update
here is a clean-up patch :

* removes sg_err.[ch] deps
* makes sure the core code play nice with klibc
* port the sysfs calls to dlist helpers
* links against udev's sysfs (need libsysfs.a & dlist.a)
* finally define DM_TARGET as "multipath" as Joe posted the code today
  (not tested yet)
* push version forward (do you want it in sync with udev version?)

libdevmapper doesn't play well with klibc, so I wasn't able to produce a
static binary yet. Help needed here ... as I don't want to fall back to
merge libdevmapper code in the core.

It compiles here and doesn't segfault.
2005-04-26 21:13:04 -07:00
greg@kroah.com
c521693b54 [PATCH] add scsi_id "extra" program from Patrick Mansfield <patmans@us.ibm.com> 2005-04-26 21:06:24 -07:00
greg@kroah.com
04a091d47e [PATCH] Add multipath "extra" program from Christophe Varoqui, <christophe.varoqui@free.fr> 2005-04-26 21:06:24 -07:00