1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-04 13:51:24 +03:00
Commit Graph

220 Commits

Author SHA1 Message Date
Kay Sievers
912541b024 tabs are as useful as a hole in the head 2012-01-10 01:34:15 +01:00
Kay Sievers
32740a39b5 rules: delete arch specific rules 2012-01-09 17:27:11 +01:00
Kay Sievers
220893b3cb remove mknod() logic and rely on 'devtmpfs' 2012-01-01 04:21:15 +01:00
Kay Sievers
3cf5266b02 builtin: move usb-db, pci-db to builtins 2011-12-27 17:02:52 +01:00
Kay Sievers
57f4ef67aa builtin: firmware - move 'firmware' tool to builtins 2011-12-25 17:58:30 +01:00
Kay Sievers
4a9460f15a rules: do not preprocess 80-drivers.rules + 75-probe_mtd.rules 2011-12-23 04:54:08 +01:00
Kay Sievers
06316d9f1a builtin: kmod - switch modprobe to builtin 2011-12-23 04:50:33 +01:00
Kay Sievers
009cc08c7b rules: do not preprocess 60-persistent-storage.rules 2011-12-23 03:23:37 +01:00
Kay Sievers
7c2dee4a4d rules: switch to built-in blkid 2011-12-23 03:21:53 +01:00
Kay Sievers
28e490c945 make: do not (mis-)use the config file generator, create .xz tarball 2011-12-21 15:46:10 +01:00
Kay Sievers
12a362be5c use libexecdir, bindir, sbindir, switch to /usr/lib/udev in documentation 2011-12-05 17:23:56 +01:00
Kay Sievers
eabac232a5 rules: fix typo 2011-11-07 23:21:29 +01:00
Kay Sievers
5101923ff9 rules: restore rule to set cdrom group for optical drives
On Sun, Nov 6, 2011 at 21:45, William Hubbs <w.d.hubbs@gmail.com> wrote:
> someone on gentoo just reported to me that the following rule has been
> deleted from udev-174, which is leaving his optical devices in the
> standard "disk" group. He does not want to add his users to this group.
2011-11-06 23:30:31 +01:00
Kay Sievers
09637f7434 rules: do not load sg module 2011-10-19 20:42:10 +02:00
Kay Sievers
fe9e1a0d4e rules: fuse: do not mount fusectl from udev rules
All mounting is done by systemd now. Non-systemd systems
need to ship their own rules if they want fusefs be auto-mounted.
2011-09-26 21:37:23 +02:00
Kay Sievers
d132be4d58 rules: remove legacy rules for cdrom and usb printer 2011-08-12 14:05:19 +02:00
Kay Sievers
d7867b3183 implement path_id, usb_id, input_id as built-in command 2011-08-05 02:00:30 +02:00
Kay Sievers
617746e097 rules: move input_id to default rules
On Tue, Aug 2, 2011 at 10:56, Thomas Bächler <thomas@archlinux.org> wrote:
> Commit c49df20758 prevented udev from
> creating broken symlinks for bluetooth hid devices. Unfortunately,
> it also removed the ID_INPUT=1 and ID_INPUT_{KEY,MOUSE}=1 properties
> from those devices. Xorg relies on these properties for cold- and
> hotplugging of input devices.
2011-08-04 23:25:03 +02:00
Kay Sievers
2ba5c37829 rules: sound - instead of ID_IFACE use standard ID_USB_INTERFACE_NUM 2011-07-20 00:21:07 +02:00
Kay Sievers
edb0d9d8d7 rules: serial - do not export ID_PORT, use ID_USB_INTERFACE_NUM 2011-07-20 00:20:00 +02:00
Kay Sievers
c49df20758 rules: input - do not create (broken) links for bluetooth devices 2011-07-20 00:05:38 +02:00
Kay Sievers
b3ca87a04a rules: mount fuse filesystem only 'add' 2011-07-14 01:50:35 +02:00
Kay Sievers
ce60b80f87 rules: input - call path_id for ACPI devices 2011-07-10 16:43:34 +02:00
Kay Sievers
665a754d03 rules: fix wrong wildcard match, we always need a ':*' at the end 2011-07-05 05:37:13 +02:00
Kay Sievers
f2a2983604 rules: remove redundant MODE="0664" from lp rules 2011-07-05 03:11:04 +02:00
Kay Sievers
15328d84d2 rules: set polling value only if it is disabled 2011-06-28 00:17:55 +02:00
Kay Sievers
ffb187faf9 rules: move polling rule above 'block' match 2011-06-18 23:05:20 +02:00
Kay Sievers
c5a41da949 rules: enable in-kernel media-presence polling 2011-06-18 21:01:33 +02:00
Keshav P.R
693b6344e1 rules: support for gpt partition uuid/label 2011-06-11 13:41:34 +02:00
Kay Sievers
eb042a2c92 rules: run input_id for main input devices too 2011-06-06 18:46:23 +02:00
Kay Sievers
3e227830ad rules: apply 'audio' group of the static snd/{seq,timer} nodes 2011-05-27 02:50:29 +02:00
Kay Sievers
67a77c8bf2 bump requirement to Linux kernel 2.6.32 and ARM 2.6.36 2011-05-05 18:58:58 +02:00
Martin Pitt
55eb500cc5 Avoid spinning up CD on pressing eject button
When the CD tray door is locked and the hardware eject button is pressed, newer
kernels (2.6.38+) will send out a change event with a DISK_EJECT_REQUEST==1
property. Do not run cdrom_id and blkid in this case, as the media state and
contents does not change, and this only needlessly spins up the drive again
right before ejection.
2011-04-04 11:47:54 +02:00
David Zeuthen
42b9482ab2 Run ata_id on non-removable USB devices
If a USB device is marked as removable, it is often a SATA/PATA disk
in an enclosure (note that flash card readers and usb storage sticks
are always marked as removable). In this case, try running ata_id
(which sends ATA commands wrapped in SCSI ATA PASS THROUGH commands)
to get information about the disk. If this fails, just fall back to
running usb_id since it could be the device isn't an ATA device at
all or the device doesn't have a SAT layer.

This extra information is nice to have as it indicates if it is
suitable to send e.g. SMART commands to the disk, whether the disk
supports power management and so on. Additionally, the VPD and serial
number returned by ata_id is usually more accurate as it stems from
the disk itself instead of the enclosure.

Note that udisks has been doing this for a while

 KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode"

so this change shouldn't be too disruptive (udisks-probe-ata-smart
also sends ATA commands via the ATA PASS THROUGH command).

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-30 10:28:24 -04:00
Kay Sievers
a31d76b186 rules: run ata_id only on SPC-3 or later optical drives 2011-03-23 12:11:38 +01:00
Martin Pitt
32567f8c95 60-persistent-input.rules: Do not create duplicate links
Commit 5e9eb156c added new symlinks for multi-interface USB input devices.
However, we do not actually need the one for interface number "00", as we
already have the symlink without the interface number.
2011-02-15 15:39:42 +01:00
Martin Pitt
5e9eb156c0 60-persistent-input.rules: Support multiple interfaces
Create /dev/input/by-id symlinks containing the USB interface number so that
each interface in a multi-interface USB input device gets its own symlink.

Thanks to a7x <ubuntu-a7x@scientician.org>!

https://launchpad.net/bugs/626449
2011-02-15 13:06:18 +01:00
Gerd Hoffmann
4e54f5334e extras: add rules for qemu guests
These patches enable usb autosuspend for the qemu emulated HID devices.
This reduces the cpu load for idle guests with a hid device attached
because the linux kernel will suspend the usb bus then and qemu can stop
running a 1000 Hz to emulate the (active) UHCI controller.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-01-25 16:14:04 +01:00
Kay Sievers
2713e6ab0a udevd: always create /dev/{char,block}/$major:$minor 2010-12-10 13:27:03 +01:00
Kay Sievers
310f99d335 rules: revert bsg use until the event ordering problem is sorted out
The bsg devices node are created after the LUN, so we fail in the
hotplug case, but succeed at coldplug, and create inconsistent data
that way.

The bsg device event order will need to be sorted out, by changing the
kernel.
2010-11-30 11:48:08 +01:00
Kay Sievers
2b15b26dfa rules: drop OSS audio rule 2010-11-24 12:05:21 +01:00
Kay Sievers
01675fbbe8 rules: 78-sound-card - remove specific hardware matches, they do not belong here 2010-11-24 12:00:31 +01:00
David Zeuthen
560de57514 Use ata_id, not scsi_id, on ATAPI devices
The major benefit here, is that we get the ATAPI device serial
number. With SCSI ID we didn't get this since it's not part of the
SCSI INQUIRY command. Specifically this means that we get symlinks to
empty optical drives, e.g.

 /dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376

which we didn't get earlier. So this is a major win.

Also make ata_id work on CD-ROM devices when using /dev/bsg nodes so
this works on both the scsi_device as well as the block device. We do
this, basically, by issuing the ATA IDENTIFY PACKET DEVICE command
instead of the ATA IDENTIFY command. We also use 16-byte pass-through
ATA passthrough instead of 12-byte passthrough to avoid clashing with
the MMC BLANK command.

This means that we get this output

 # udevadm info -q all -p /sys/devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 P: /devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 E: UDEV_LOG=3
 E: DEVPATH=/devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 E: DEVTYPE=scsi_device
 E: DRIVER=sr
 E: MODALIAS=scsi:t-0x05
 E: SUBSYSTEM=scsi
 E: ID_ATA=1
 E: ID_TYPE=cd
 E: ID_BUS=ata
 E: ID_MODEL=VBOX_CD-ROM
 E: ID_MODEL_ENC=VBOX\x20CD-ROM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x 20\x20\x20\x20\x20\x20\x20
 E: ID_REVISION=1.0
 E: ID_SERIAL=VBOX_CD-ROM_VB2-01700376
 E: ID_SERIAL_SHORT=VB2-01700376

instead of just

 # udevadm info -q all -p /sys/devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 P: /devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 E: UDEV_LOG=3
 E: DEVPATH=/devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 E: DEVTYPE=scsi_device
 E: DRIVER=sr
 E: MODALIAS=scsi:t-0x05
 E: SUBSYSTEM=scsi
 E: ID_SCSI=1
 E: ID_VENDOR=VBOX
 E: ID_VENDOR_ENC=VBOX\x20\x20\x20\x20
 E: ID_MODEL=CD-ROM
 E: ID_MODEL_ENC=CD-ROM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
 E: ID_REVISION=1.0
 E: ID_TYPE=cd

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-11-04 13:29:38 -04:00
David Zeuthen
2938220037 Run scsi_id and ata_id on the scsi_device object
In a multi-initiator setup, the HBA may very well export a SCSI device
for a device that another initiator has already logged into. But since
another initiator has already logged in, the kernel will not create a
block device.

Note that this is also the case for some RAID HBAs - for example, the
LSI 1068 series cards will export a SCSI device for a disk that is in
use by the HBAs RAID engine (no block device will be created here).

Running scsi_id and ata_id on the actual SCSI device means that we can
inquire the capabilities of the device. For example, we can check
whether ID_ATA_FEATURE_SET_SMART and ID_ATA_FEATURE_SET_SMART_ENABLED
is set and, if so, periodically poll the SMART status of the
disk. Even when other initiators has claimed the disk and if the disk
is in use by the RAID engine of the HBA.

Note that we run scsi_id and ata_id on /dev/bsg/* nodes - this is safe
to do because the scsi core guarantees that the bsg device has been
created before the actual add uevent for the scsi_device is emitted.

Since the block device is a direct child of the scsi_device we can
avoid running scsi_id and ata_id again by simply importing the
resulting ID_* properties from the parent.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-30 13:04:35 -04:00
Martin Pitt
c112a41a43 fix various syntax errors in rules 2010-09-21 12:14:50 +02:00
Kay Sievers
9de4a43a89 rules: remove firewire rules for deprecated drivers 2010-07-12 11:04:17 +02:00
Stefan Richter
1bbc1a9cb0 rules: add more FireWire IDs: Point Grey IIDC; AV/C + vendor unique
1. IIDC cameras from Point Grey use the vendor OUI as Specifier_ID
instead of the 1394 TA's OUI but are otherwise fully compliant to the
IIDC spec. Their device files should be accessible like those of any
other IIDC cameras.

2. Originally, the Software_Version of devices that implement FCP
(IEC 61883-1 Function Control Protocol) was meant to be a bitmap of all
command sets that an FCP capable unit supports.  Bitmap flags are
defined for AV/C, CAL, EHS, HAVi, and vendor unique command sets.
Software_Version was revised to be a simple identifier instead, and
devices that support several command sets were meant to instantiate one
unit directory for each command set.  Still, some devices with the flags
for AV/C and vendor unique command sets combined were released (but
apparently no devices with any other flag combinations).  These rare but
existing AV/C + vendor unique devices need to be accessible just like
plain AV/C devices.

Side notes:
 - Many AV/C devices make use of the Vendor Dependent AV/C command, but
this is unrelated to vendor unique FCP command sets.
 - Here are all standardized FireWire protocol identifiers that I know
of, listed as Specifier_ID:Software_Version | specifier | protocol.
0x00005e:0x000001 | IANA    | IPv4 over 1394 (RFC 2734)
0x00005e:0x000002 | IANA    | IPv6 over 1394 (RFC 3146)
0x00609e:0x010483 | INCITS  | SBP-2 (or SCSI command sets over SBP-3)
0x00609e:0x0105bb | INCITS  | AV/C over SBP-3
0x00a02d:0x010001 | 1394 TA | AV/C (over FCP)
0x00a02d:0x010002 | 1394 TA | CAL
0x00a02d:0x010004 | 1394 TA | EHS
0x00a02d:0x010008 | 1394 TA | HAVi
0x00a02d:0x014000 | 1394 TA | Vendor Unique
0x00a02d:0x014001 | 1394 TA | Vendor Unique and AV/C (over FCP)
0x00a02d:0x000100 | 1394 TA | IIDC 1.04
0x00a02d:0x000101 | 1394 TA | IIDC 1.20
0x00a02d:0x000102 | 1394 TA | IIDC 1.30
0x00a02d:0x0A6BE2 | 1394 TA | DPP 1.0
0x00a02d:0x4B661F | 1394 TA | IICP 1.0
For now we are only interested in udev rules for AV/C and IIDC.

Reported-by: Damien Douxchamps <ddsf@douxchamps.net> (Point Grey IIDC ID)
Reported-by: Clemens Ladisch <clemens@ladisch.de> (AV/C + vendor unique ID)
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-12 11:02:49 +02:00
Harald Hoyer
0c73778809 60-persistent-storage-tape.rules: make own by-path symlink for nst tapes 2010-07-08 11:37:48 +02:00
Harald Hoyer
847b4f84c6 60-persistent-storage-tape: s/path_id.sh/path_id/ 2010-07-07 11:00:23 +02:00
Kay Sievers
4766b1058e rules: tape - remove WAIT_FOR instruction and don't export BSG_DEV 2010-07-07 09:54:21 +02:00