summaryrefslogtreecommitdiff
path: root/extras
AgeCommit message (Collapse)Author
2005-04-26[PATCH] delete udev_selinux as it doesn't work properly and is the wrong way ↵greg@kroah.com
to do it...
2005-04-26[PATCH] Deleted the udev_dbus extra as it didn't really work properly and ↵greg@kroah.com
HAL has a real solution now.
2005-04-26[PATCH] udev_volume_id updatekay.sievers@vrfy.org
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[PATCH] udev callout for reading filesystem labelskay.sievers@vrfy.org
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[PATCH] udev callout for reading filesystem labelskay.sievers@vrfy.org
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[PATCH] udev_selinux changeskay.sievers@vrfy.org
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[PATCH] devfs.sh-ide-floppymd@Linux.IT
2005-04-26[PATCH] udev_dbus changeskay.sievers@vrfy.org
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[PATCH] DEVNODE -> DEVNAME transition fixessjoerd@spring.luon.net
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[PATCH] Add README for chassis_idatul.sabharwal@intel.com
2005-04-26[PATCH] clean up chassis_id coding style.greg@kroah.com
2005-04-26[PATCH] Add chassis_id program to extras directoryatul.sabharwal@intel.com
2005-04-26[PATCH] small ide-devfs.sh fixmd@Linux.IT
The file may not exist and errors would be spewed on the console.
2005-04-26[PATCH] move udev_selinux into extras/selinuxgreg@kroah.com
2005-04-26[PATCH] move udev_dbus to extras/dbusgreg@kroah.com
Should build now, but might have linking problems.
2005-04-26[PATCH] SCSI logical and physical names for udevrgooch@ras.ucalgary.ca
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[PATCH] make spotlessolh@suse.de
klibc has a target make spotless, this patch makes it possible to clean the whole udev tree and start from scratch.
2005-04-26[PATCH] Added multipath-tools 0.1.1 releasegreg@kroah.com
2005-04-26[PATCH] deleted current extras/multipath directorygreg@kroah.com
2005-04-26[PATCH] make start_udev use udevstart binarygreg@kroah.com
2005-04-26[PATCH] multipath updatechristophe.varoqui@free.fr
2005-04-26[PATCH] remove usage of expr in ide-devfs.shmd@Linux.IT
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[PATCH] update udev scsi_id to scsi_id 0.4patmans@us.ibm.com
This patch syncs the scsi_id in the udev tree to version 0.4.
2005-04-26[PATCH] remove udevd priority TODO item, as it's not needed at all.greg@kroah.com
We want to be started by keventd, as that runs at a very fast priority.
2005-04-26[PATCH] more HOWTO cleanups.greg@kroah.com
2005-04-26[PATCH] udev use new libsysfs header file locationpatmans@us.ibm.com
Use the new location of libsysfs header files.
2005-04-26[PATCH] add start_udev init script.greg@kroah.com
2005-04-26[PATCH] update extras/multipathext.devoteam.varoqui@sncf.fr
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[PATCH] udev - switch callout part selector to {attribute}kay.sievers@vrfy.org
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[PATCH] more udev-016/extras/multipathchristophe.varoqui@free.fr
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[PATCH] more udev-016/extras/multipathchristophe.varoqui@free.fr
> 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[PATCH] update extras/multipathchristophe.varoqui@free.fr
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[PATCH] add KERNEL_DIR option so that the distros will be happygreg@kroah.com
Based on a patch from Svetoslav Slavtchev <svetljo@gmx.de>
2005-04-26[PATCH] get_dev_number() in extras/ide-devfs.shelkropac@students.zcu.cz
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[PATCH] move udevinfo into the main build and clean up the main Makefile a bit.greg@kroah.com
2005-04-26[PATCH] udevinfo - now a real program :)kay.sievers@vrfy.org
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[PATCH] udev - udevinfo with device chain walkkay.sievers@vrfy.org
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[PATCH] udev-013/extras/multipath updatechristophe.varoqui@free.fr
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[PATCH] udev - program to query all device attributes to build a rulekay.sievers@vrfy.org
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[PATCH] update udev scsi_id to scsi_id 0.3patmans@us.ibm.com
2005-04-26[PATCH] udev - small script optimizationkay.sievers@vrfy.org
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[PATCH] udev - CALLOUT is PROGRAM nowkay.sievers@vrfy.org
replace CALLOUT by PROGRAM and fix old rule format
2005-04-26[PATCH] LSB init script and other stuffeike-hotplug@sf-tec.de
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[PATCH] fix Silly udev scriptkay.sievers@vrfy.org
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[PATCH] add silly script that names cdrom drives based on the cd in them.greg@kroah.com
2005-04-26[PATCH] extras multipath updatechristophe.varoqui@free.fr
incremental to 0.0.12-1, * check hotplug event refers to a block device; if not exit early
2005-04-26[PATCH] extras multipath updatechristophe.varoqui@free.fr
2003-12-29 multipath-012 * refresh doc * add the uninstall target in Makefile * /sbin/multipath, not /root/multipath in hotplug agent
2005-04-26[PATCH] ide-devfs.sh updatekay.sievers@vrfy.org
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[PATCH] extras multipath updatechristophe.varoqui@free.fr
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[PATCH] extras multipath updatechristophe.varoqui@free.fr
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"