Commit graph

1437 commits

Author SHA1 Message Date
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
Greg KH 02a9a08fb7 update gentoo rule file.
This fixes the issue of cdroms not showing up in the proper group,
and them showing up in /dev/cd/ for the persistant names.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-11 13:02:44 -07:00
Kay Sievers 4937afa402 move some logging to the info level
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-11 21:01:46 +02:00
Kay Sievers 2b996ad193 add Usage: to udevmonitor and udevcontrol
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-11 20:34:24 +02: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 7fd0de4984 update SUSE rules
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-11 17:19:05 +02:00
Thierry Vignaud a1ea706a1e fix udevinfo output 2005-08-10 17:06:01 +02:00
Kay Sievers 59d6bfefce split udev_util in several files
It too big for the small tools to link against for only the log function.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-10 16:54:14 +02:00
Kay Sievers d33c51c245 update SUSE rules
Tape naming is harder than expected, go back to block devices only.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-10 15:27:25 +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 34c00c915c update README
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-09 19:45:08 +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
Kay Sievers 1bcac4e483 update SUSE rules
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-09 15:53:17 +02:00
Kay Sievers 80489e6395 add SUSE rules
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-09 12:29:12 +02:00
Kay Sievers b7299fd904 update distro rules files
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-09 11:58:11 +02:00
Kay Sievers bfd1294892 add flag for reading of precompiled rules
Rules can be precompiled and stored on disk for initramfs, to avoid
parsing the rules with every event again and again. Also the OWNER and
GROUP names are already resolved to numerical values in the compiled
rules. This flag is used for the upcoming move of the rules parsing
into udevd:
  If the real root is mounted udevd is started and parses the rules
  only once. The event processes will inherit the already parsed rules
  from the daemon, so we want to ignore any precompiled rules and
  use the real rules files and watch the filesystem for changes to
  reload the rules automatically.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-08 17:43:42 +02:00
Kay Sievers 63cc8f0491 allow clean shutdown of udevd
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-08 05:07:36 +02:00
Kay Sievers 13d11705bf switch some strlcpy's to memcpy
strlcpy counts the sourec string lengt and is therefore not suitable
to copy a defined length of characters from one string to another.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-08 02:21:55 +02:00
Kay Sievers 738428b449 read sysfs attribute also from parent class device
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-05 01:52:57 +02:00
Greg KH 52dbd80e78 updated gentoo rule file to handle removable ide devices.
Thanks to Kay for the quick fix.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-04 16:33:53 -07:00
Kay Sievers 47e353f9b9 add NETLINK define for the lazy distros
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-04 12:24:41 +02:00
Greg Kroah-Hartman cfb7ac2b5b 065 release 2005-08-02 13:56:41 -07:00
Greg Kroah-Hartman c5e6eaa002 Merge gregkh@ehlo.org:/home/kay/public_html/pub/scm/linux/hotplug/udev-kay 2005-08-02 13:07:30 -07:00
Greg Kroah-Hartman 74f1ce92c4 Added persistent name rules for block devices to gentoo rule file.
Copied from Kay's rules from the SuSE package.

Let the fun begin...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-02 12:28:50 -07:00
Kay Sievers 61341fae4f update release notes for next version
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-02 04:32:19 +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
Greg Kroah-Hartman be962ec9a8 Update gentoo rules file.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-08-01 15:44:02 -07:00
Kay Sievers 1bc3362678 add udevmonitor, to debug netlink+udev events at the same time
This rule:
  RUN+="socket:/org/kernel/udev/monitor"

send the event to the running monitor. Running udevstart give a nice
monitor output. Also the delay between the kernel uevent and the udev
udev event can be investigated:

  pim:/home/kay/src/udev-kay # ./udevmonitor
  UEVENT[1122920113] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1
  UEVENT[1122920113] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0
  UEVENT[1122920113] add@/class/scsi_host/host12
  UEVENT[1122920113] add@/class/usb_device/usbdev2.99
  UEVENT[1122920113] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0/host12/target12:0:0/12:0:0:0
  UDEV  [1122920113] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1
  UEVENT[1122920113] add@/block/sda
  UEVENT[1122920113] add@/class/scsi_generic/sg0
  UEVENT[1122920113] add@/class/scsi_device/12:0:0:0
  UDEV  [1122920113] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0
  UDEV  [1122920113] add@/class/scsi_host/host12
  UDEV  [1122920113] add@/class/usb_device/usbdev2.99
  UDEV  [1122920113] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0/host12/target12:0:0/12:0:0:0
  UDEV  [1122920113] add@/block/sda
  UDEV  [1122920113] add@/class/scsi_generic/sg0
  UDEV  [1122920113] add@/class/scsi_device/12:0:0:0
  UEVENT[1122920115] add@/block/sda/sda1
  UDEV  [1122920115] add@/block/sda/sda1

  pim:/home/kay/src/udev-kay # ./udevmonitor --env
  UDEV  [1122920185] add@/block/sda/sda1
  ACTION=add
  DEVPATH=/block/sda/sda1
  SUBSYSTEM=block
  SEQNUM=2159
  MINOR=1
  MAJOR=8
  PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0/host13/target13:0:0/13:0:0:0
  PHYSDEVBUS=scsi
  PHYSDEVDRIVER=sd
  UDEVD_EVENT=1
  UDEV_LOG=3
  ID_VENDOR=IBM
  ID_MODEL=Memory_Key
  ID_REVISION=3.04
  ID_SERIAL=IBM_Memory_Key_0218B301030027E8
  ID_TYPE=disk
  ID_BUS=usb
  ID_PATH=usb-0218B301030027E8:0:0:0
  ID_FS_USAGE=filesystem
  ID_FS_TYPE=vfat
  ID_FS_VERSION=FAT16
  ID_FS_UUID=42D8-9E02
  ID_FS_LABEL_SAFE=s_p_c
  DEVNAME=/dev/sda1

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-01 20:22:46 +02:00
Kay Sievers d455b0085d allow RUN to send the environment to a local socket
RUN="socket:<name>" will send the environment in the kernel uevent
format to the named destination. Using the socket instead of the program
to pass the hotplug events to the HAL daemon, cuts down the running
time of udevstart from 0.8 to 0.4 seconds on my box.

  env -i ACTION=add DEVPATH=/block/hda/hda1 strace -s10000 ./udev block
  sendto(3, "add@/block/hda/hda1\0
    ACTION=add\0DEVPATH=/block/hda/hda1\0UDEV_LOG=3\0
    ID_TYPE=disk\0ID_MODEL=HTS726060M9AT00\0ID_SERIAL=MRH401M4G6UM9B\0
    ID_REVISION=MH4OA6BA\0ID_BUS=ata\0ID_PATH=pci-0000:00:1f.1-ide-0:0\0
    ID_FS_USAGE=other\0ID_FS_TYPE=swap\0ID_FS_VERSION=2\0
    ID_FS_UUID=9352cfef-7687-47bc-a2a3-34cf136f72e1\0
    ID_FS_LABEL=ThisIsSwap\0ID_FS_LABEL_SAFE=ThisIsSwap\0
    DEVNAME=/dev/hda1\0"

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-01 05:07:19 +02: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
Greg Kroah-Hartman 62a22c8d75 Oops, 064 release, not 063 2005-07-23 12:27:02 -04:00
Greg Kroah-Hartman fa5c98ab9c 063 release 2005-07-23 12:26:28 -04: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
Kay Sievers 761e5b476f make SYSFS{} usable for all devices
Patch from:
  Hannes Reinecke <hare@suse.de>
2005-07-20 12:12:56 -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
Kay Sievers 594dd61025 allow rules to have labels and skip to next label
This will allow us to have whole blocks of rules to skip
conditionally. The following section creates the node "yes":
  GOTO="TEST"
  NAME="no"
  NAME="no2", LABEL="NO"
  NAME="yes", LABEL="TEST"
  NAME="no3"
2005-07-16 07:46:31 +02:00
Kay Sievers c609f627fa thread unknown ENV{key} match as empty value
This way we can run a rule if a certain key is not set by:
  ENV{key}="" or ENV{key}!="?*"

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-16 05:50:34 +02:00
Greg KH 8365854ccd 063 release 2005-07-14 16:09:21 -07:00
Greg KH 0de3c3edeb add 'make tests' as I'm always typing that one wrong...
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-14 15:27:30 -07: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
Greg KH 39e54555a9 Merge gregkh@ehlo.org:/home/kay/public_html/pub/scm/linux/hotplug/udev-kay 2005-07-14 14:13:34 -07:00
Ville Skyttä 7fe082a8a4 correct default mode documentation in udev 2005-07-14 11:43:05 +02:00
Anton Farygin 8cf97fb046 fix typo in GROUP value application 2005-07-14 11:39:55 +02:00