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

3073 Commits

Author SHA1 Message Date
Kay Sievers
a25d547dd4 udevd: use enum instead of char in struct declaration 2009-06-05 23:27:11 +02:00
Marcel Holtmann
213f0355c0 rules: make RFKILL control device world readable 2009-06-05 15:09:05 +02:00
Kay Sievers
9fc643a414 rules: do not call path_id for virtual devices 2009-06-04 03:21:33 +02:00
Kay Sievers
9290143d2d udevd: close netlink socket in worker and set cloexec 2009-06-04 02:49:42 +02:00
Kay Sievers
1e03b754ae udevd: convert to event worker processes
Event processes now get re-used after they handled an event. This reduces
pressure on the CPU significantly because cloned event processes no longer
cause page faults in the main daemon. After the events have settled, the
no longer needed worker processes get killed.
2009-06-04 01:44:04 +02:00
Kay Sievers
b61f48a0e8 str[sp]cpyl: add __attribute__ ((sentinel)) 2009-06-01 21:10:29 +02:00
Kay Sievers
82c785e5dc udevd: remove check for dev_t, DEVPATH_OLD takes care of that 2009-05-29 18:54:03 +02:00
Kay Sievers
97f48a8c67 udevadm: settle - add --exit-if-exists=<file> 2009-05-29 14:05:39 +02:00
Kay Sievers
e91ac78ffc cdrom_id: add error message if open() fails 2009-05-29 13:21:38 +02:00
Kay Sievers
dc383337b3 udevadm: control - add comment to man page about --reload-rules 2009-05-28 19:21:35 +02:00
Alan Jenkins
542aeeb48a udevd: queue-export - fix crash
The math in skip_to() was the wrong way round and allocated a
variable size array on the stack with a massively negative size.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-05-28 19:19:42 +02:00
Alan Jenkins
a29b30b411 udev-selinux.c: remove libudev header
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-05-28 12:50:10 +02:00
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