1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 23:51:28 +03:00
Commit Graph

3061 Commits

Author SHA1 Message Date
Kay Sievers
d3c8231e73 cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable CDROM media
Some broken fake cdrom drives return ID_CDROM_MEDIA_STATE=blank.

  $ /lib/udev/cdrom_id -d /dev/sr1
  main: probing: '/dev/sr1'
  cd_inquiry: INQUIRY: [Nokia   ][S60             ][1.0 ]
  cd_profiles: GET CONFIGURATION: number of profiles 76
  cd_profiles: current profile 0x08
  cd_media_toc: READ TOC: len: 12
  cd_media_toc: last track 1 starts at block 0
  cd_media_info: disk type 00
  ID_CDROM=1
  ID_CDROM_MRW=1
  ID_CDROM_MRW_W=1
  ID_CDROM_MEDIA=1
  ID_CDROM_MEDIA_CD=1
  ID_CDROM_MEDIA_STATE=blank

Others work fine, but ID_CDROM_MEDIA_STATE is not needed for non-writable CDROM media:

  $ /lib/udev/cdrom_id -d /dev/sr1
  main: probing: '/dev/sr1'
  cd_inquiry: INQUIRY: [SanDisk ][U3 Cruzer Micro ][8.02]
  cd_profiles: GET CONFIGURATION: number of profiles 72
  cd_profiles: current profile 0x08
  cd_media_toc: READ TOC: len: 20
  cd_media_toc: track=1 info=0x4(data) start_block=0
  cd_media_toc: last track 1 starts at block 0
  cd_media_info: disk type 00
  ID_CDROM=1
  ID_CDROM_MRW=1
  ID_CDROM_MRW_W=1
  ID_CDROM_MEDIA=1
  ID_CDROM_MEDIA_CD=1
  ID_CDROM_MEDIA_STATE=complete
  ID_CDROM_MEDIA_SESSION_COUNT=1
  ID_CDROM_MEDIA_TRACK_COUNT=1
  ID_CDROM_MEDIA_TRACK_COUNT_DATA=1
2009-05-26 00:50:45 +02:00
Benjamin Gilbert
bec7e07acc test: check string substitutions in OWNER and GROUP
String substitutions in OWNER and GROUP keys were broken in udev 137-142.
Explicitly test for this, since such breakage will not manifest in typical
rulesets.
2009-05-22 20:54:46 +02:00
Kay Sievers
12a7c14b86 rules: add SUBSYSTEM match to scsi rules
On Fri, May 22, 2009 at 16:15, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
> I've been looking at what is responsible for all the path lookup activity in
> coldplug.  On my debian stable system, it looks like every device gets its
> parent looked up in sysfs.  I think this is due to SUBSYSTEMS matches.
>
> I see the udev default rules are different, but it looks like they still
> test for SUBSYSTEMS on every single device. Should we add SUBSYSTEM="scsi_generic"
> to these three rules?
2009-05-22 16:44:53 +02:00
Kay Sievers
c406de19dc update NEWS 2009-05-21 23:52:09 +02:00
Kay Sievers
9f894a3391 udevadm: settle - make --timeout=0 working 2009-05-21 23:49:53 +02:00
Alan Jenkins
f503f6b22f udevd: implement a more efficient queue file format
Directory lookups show up in profiling. The queue files are responsible
for a large proportion of file-related system calls in udev coldplug.

Instead of creating a file for each event, append their details to a
log file.  The file is periodically rebuilt (garbage-collected) to
prevent it from growing indefinitely.

This single queue file replaces both the queue directory and the
uevent_seqnum file. On desktop systems the file tends not to grow
beyond one page. So it should also save a small amount of memory in
tmpfs.

Tests on a running EeePC indicate average savings of 5% *udevd* cpu time
as measured by oprofile. __link_path_walk is reduced from 1.5% to
1.3%. It is not completely clear where the rest of the gains come from.

In tests running ~400 events, the queue file is rebuilt about 5 times.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-05-21 22:22:37 +02:00
Alan Jenkins
f9b3f88f71 udevd: remove tiny bit of dead code 2009-05-21 18:31:43 +02:00
Kay Sievers
81469dae34 fix location of database files 2009-05-21 01:44:45 +02:00
Kay Sievers
ce449f89d6 keep the ifdef'd udevd testing/profiling hack 2009-05-21 01:20:18 +02:00
Kay Sievers
bd75fddbcb require key names in uppercase
Drop pretty expensive case-insensitive matching, and key names in
mixed or lowercase are not supported anyway.
2009-05-20 23:45:32 +02:00
Kay Sievers
fb04513470 remove unused GL_FORMAT from rules parser 2009-05-20 23:12:22 +02:00
Kay Sievers
690ed63a22 update TODO 2009-05-20 19:43:26 +02:00
Kay Sievers
e6c1a2bde7 use openat(), unlinkat(), fstatat() 2009-05-20 18:58:52 +02:00
Kay Sievers
eba87f55f6 edd_id: use openat() 2009-05-20 18:10:26 +02:00
Kay Sievers
065db05221 use more efficient string copying 2009-05-20 17:57:52 +02:00
Alan Jenkins
f58a9099bb udevadm: settle - fix timeout
The timeout wasn't working when settle was run as root:
  # udevadm control --stop-exec-queue
  # udevadm trigger
  # udevadm settle --timeout=1
  ... (hangs)

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-05-20 16:12:22 +02:00
Kay Sievers
a0ee5a05bb remove format char string truncation syntax 2009-05-19 12:56:17 +02:00
Scott James Remnant
055e40edc6 OWNER/GROUP: fix if logic
The introduction of the --resolve-names=early/never code introduced a
bug to the OWNER/GROUP lookup.  Previously if the name had contained $,
lookup would have been performed later; after the patch, the key ended
up being ignored!
2009-05-14 12:42:44 +01:00
Kay Sievers
b4fa1b67f8 rule-generator: cd - skip by-path links if we create by-id links 2009-05-14 12:57:19 +02:00
Kay Sievers
1e5e05730a Revert "rules: v4l do not mix vbi and video nodes"
This reverts commit 6205f1186e.
2009-05-14 00:32:25 +02:00
Kay Sievers
0c37798916 fix possible endless loop for GOTO to non-existent LABEL
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526365
2009-05-13 18:01:32 +02:00
Kay Sievers
6205f1186e rules: v4l do not mix vbi and video nodes 2009-05-13 17:55:08 +02:00
Kay Sievers
9d5bdeb3d3 version bump 2009-05-13 03:13:08 +02:00
Kay Sievers
634ffc0ce2 release 142 2009-05-13 02:35:37 +02:00
Kay Sievers
3de63a356f delete libvolume_id 2009-05-12 13:28:01 +02:00
Kay Sievers
f07996885d delete vol_id and require util-linux-ng's blkid 2009-05-11 04:12:23 +02:00
Kay Sievers
86d9bf4bec update TODO 2009-05-11 03:53:55 +02:00
Kay Sievers
4a74214a58 add "static" back to the inline functions
<Keybuk> kay: udev git head ftbfs
<Keybuk> udev-watch.o: In function `udev_selinux_init':
<Keybuk> /../udev/udev.h:130: multiple definition of `udev_selinux_init'
2009-05-07 13:24:40 +02:00
Kay Sievers
d67e32aeb2 rules: fix ieee1394 rules 2009-05-05 12:43:42 +02:00
Kay Sievers
619b97ff2b remove asmlinkage 2009-05-05 02:39:16 +02:00
Kay Sievers
e3196993f1 remove all PHYSDEVPATH handling and warning about 2009-05-04 22:08:05 +02:00
Kay Sievers
efca104ccf oops, removed ppp entry from rules got committed 2009-05-04 14:10:05 +02:00
Kay Sievers
cb14f4543a handle devtmpfs nodes
UDev follows the kernel given name, and re-uses the kernel created
device node. If the kernel and spcecified udev rules disagree, the
udev specified node node is created and the kernel-created on is
deleted.
2009-05-04 04:52:31 +02:00
Lubomir Rintel
9379b7c16d rule-generator: net - whitelist NICs that violate MAC local scheme
According to list of assigned ethernet codes [1] referred to by
IANA [2] certain global addresses do not follow the assignement
scheme and use numbers reserved for local use. Several such adapters
are quite widely used, generate rules for them.

[1] http://www.cavebear.com/archive/cavebear/Ethernet/vendor.html
[2] http://www.iana.org/assignments/ethernet-numbers
2009-05-03 15:37:30 +02:00
Kay Sievers
3157c02d2b rules: remove initramfs comment 2009-05-03 14:44:23 +02:00
Kay Sievers
a00bdfa16b udevd: revert initial device node creation 2009-05-02 05:23:02 +02:00
Kay Sievers
998d9788e7 rules: add "event*" match 2009-05-01 17:52:21 +02:00
Kay Sievers
cb0237d7d9 build: use AC_MSG_RESULT 2009-05-01 05:09:51 +02:00
Kay Sievers
8abc567533 update TODO 2009-04-29 15:57:41 +02:00
Kay Sievers
8e4bd22558 accept DEVNAME from the kernel as a hint for the node name 2009-04-28 15:59:45 +02:00
Kay Sievers
6d34b6af12 rules: add rfcomm* to group dialout
https://bugs.launchpad.net/bugs/368109
2009-04-28 11:24:25 +02:00
Kay Sievers
c311b393be rules: input - fix comments 2009-04-27 03:50:48 +02:00
Kay Sievers
4d3657816a rules: input - add links for USB/platform non-kbd/mouse devices 2009-04-27 03:23:41 +02:00
Kay Sievers
1f698065bc rule_generator: net - fix usb comment generation
On Sat, Apr 4, 2009 at 22:17, Omair Eshkenazi <stimpson@phys.huji.ac.il> wrote:
> I noticed that in (70-)persistent-net.rules, the comments for USB devices
> are missing the device/vendor id's. Example:
> # USB device 0x:0x (rt73usb)
2009-04-26 20:53:30 +02:00
Kay Sievers
37ed4f5619 drop "extern" keyword from non-static function 2009-04-26 13:59:39 +02:00
Kay Sievers
aa1aa46f95 update NEWS 2009-04-24 02:27:44 +02:00
Andre Przywara
57ec3a57f1 rules: create /dev/cpu/<n>/cpuid world readable
I don't see any security implications, to be actually useful,
/dev/cpu/<n>/cpuid should be world readable. The cpuid instruction
can be called from userspace anyway, so there is nothing to hide.
The device does not support any write operation, so 0444 should
suffice.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2009-04-24 00:29:53 +02:00
Kay Sievers
19d7e87cc0 libudev: monitor - export filter_update() 2009-04-23 18:05:10 +02:00
Kay Sievers
34f55e1dc7 libudev: queue - clarify comments 2009-04-23 15:16:26 +02:00
Kay Sievers
d6f0b22d57 cdrom_id: skip media tests if CDROM_DRIVE_STATUS != CDS_DISC_OK 2009-04-23 15:04:16 +02:00