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

508 Commits

Author SHA1 Message Date
Kay Sievers
820fc48f24 udevd: add timestamp to --debug output 2009-07-17 13:26:46 +02:00
Kay Sievers
c380472899 udevd: use bool 2009-07-13 03:33:15 +02:00
Kay Sievers
bc113de9a4 udevd: handle SIGCHLD before the worker event message
We may need to handle SIGCHLD before the queued worker message. The last
reference, from the SIGCHLD or the worker message will clean up the worker
context. In case we receive an unexpected SIGCHLD with an error, we let
the event fail and clean up the worker context.
2009-07-13 03:09:05 +02:00
Kay Sievers
adda4c682a udevd: make sure a worker finishes event handling before exiting
Persistent network rules write out new rules files. When rules change,
we need to kill all workers to update the in-memory copy of the rules.
We need to make sure, that a worker finshes its work for all device
messages it has accepted, before it exits after a SIGTERM from the main
process.
2009-07-11 18:21:26 +02:00
Kay Sievers
405c307a72 udevadm: info - add space after R:, A:, W: on database export
<zzam> kay: udevadmin info -e prints all lines with a space after the :, but the W: line
<kay> zzam: yeah, seems so, and the R: and the A:
<zzam> yeah
2009-07-08 17:05:55 +02:00
Kay Sievers
a073cfa844 udevd: detach event from worker if we kill a worker
Jul  8 09:36:41 udevd[663]: worker [5491] did not accept message, kill it
Jul  8 09:36:41 udevd[663]: worker [5491] unexpectedly returned with 0
Jul  8 09:36:41 udevd[663]: worker [5551] unexpectedly returned with 0
Jul  8 09:36:41 kernel: [  156.832086] <6>udevd[663]: segfault at 4 ip 00959fbc sp bfbe7b78 error 6 in udevd[94f000+1c000]

https://bugs.launchpad.net/ubuntu/+source/udev/+bug/396957
2009-07-08 14:13:20 +02:00
Kay Sievers
257bb4cdac use MIN() MAX() from param.h 2009-07-07 19:30:19 +02:00
Kay Sievers
456719b6f9 udevadm: test - print list of properties 2009-07-02 22:56:19 +02:00
Kay Sievers
f045aa1cab man: udev - add private properties like ENV{.FOO}="bar" 2009-06-28 17:10:04 +02:00
Kay Sievers
b25a94549c do not exports properties starting with a '.'
Private variables can be marked like:
  ENV{.FOO}="bar"
2009-06-28 02:21:58 +02:00
Kay Sievers
717244eba0 udev/.gitignore: add udev.pc 2009-06-22 00:33:09 +02:00
Kay Sievers
3ab2be88bd udev.pc: add 2009-06-19 19:17:18 +02:00
Kay Sievers
6133f3432f cleanup ./configure installation directory options 2009-06-17 02:25:07 +02:00
Kay Sievers
045a3bc89e USE_LOG -> ENABLE_LOGGING, DEBUG -> ENABLE_DEBUG, USE_SELINUX -> WITH_SELINUX 2009-06-14 17:53:15 +02:00
Kay Sievers
ff5d99e0b0 udevadm: info -revert "accept --query without argument"
Getopt is too dumb, the optional argument breaks "udevadm -q symlink".
2009-06-10 15:55:24 +02:00
Kay Sievers
98631e1c21 libudev: rename private files to *-private.c 2009-06-09 23:12:12 +02:00
Kay Sievers
44b49d3736 move common stuff from udev/ to private parts of libudev/ 2009-06-09 23:05:25 +02:00
Kay Sievers
9060b066d9 move syslog wrapper to libudev 2009-06-09 22:47:48 +02:00
Kay Sievers
12bc9c54f2 udevd: log info for created/killed workers 2009-06-09 18:31:14 +02:00
Kay Sievers
48a9b173e8 libudev: move to top-level directory 2009-06-08 21:36:06 +02:00
Kay Sievers
15a45c89e5 libudev: add comments to libudev.h 2009-06-08 19:31:07 +02:00
Kay Sievers
45798927f8 udevd: print error if worker dies unexpectedly 2009-06-08 17:16:48 +02:00
Kay Sievers
b0d5e0df3e udevadm: monitor --environment -> --property 2009-06-07 03:07:33 +02:00
Kay Sievers
5654503680 udevadm: control - --env -> --property 2009-06-07 02:53:35 +02:00
Kay Sievers
0254b2118f udevadm: info - accept --query without a value and print properties 2009-06-07 02:39:54 +02:00
Kay Sievers
80381823bc udevadm: trigger - add --property-match=<key>:<value> 2009-06-07 02:07:54 +02:00
Kay Sievers
701a57da31 libudev: enumerate - allow multiple keys with the same name 2009-06-07 01:51:38 +02:00
Kay Sievers
93ee84ce07 fix signed/unsigned warning 2009-06-06 21:19:56 +02:00
Kay Sievers
4950b6e6a8 cleanup $attr{} substitution 2009-06-06 04:54:41 +02:00
Kay Sievers
32028733ee allow format substitution in path of ATTR{<path>}=="<value>" 2009-06-06 04:52:52 +02:00
Kay Sievers
a25d547dd4 udevd: use enum instead of char in struct declaration 2009-06-05 23:27:11 +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
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
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
e6c1a2bde7 use openat(), unlinkat(), fstatat() 2009-05-20 18:58:52 +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
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
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
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
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
Kay Sievers
a00bdfa16b udevd: revert initial device node creation 2009-05-02 05:23:02 +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
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
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
8c3ae78546 libudev: queue - fix get_seqnum_is_finished()
On Thu, Apr 23, 2009 at 11:39, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
> I'm puzzled by this function:
>
>        /* if we have not seen this seqnum, check if it is/was already queued */
>        if (seqnum < udev_queue->last_seen_udev_seqnum) {
>                udev_queue_get_udev_seqnum(udev_queue);
>                if (seqnum < udev_queue->last_seen_udev_seqnum)
>
> Shouldn't the test be (seqnum > udev_queue->last_seen_udev_seqnum) ?
2009-04-23 13:23:45 +02:00
Kay Sievers
08a7a795f6 libudev: monitor - add udev_monitor_filter_remove 2009-04-23 04:07:51 +02:00
Kay Sievers
bb7045a0a3 udevadm: monitor - add <subsytem>:<devtype> support 2009-04-23 04:07:15 +02:00
Kay Sievers
e93c38c3a2 libudev: monitor - do not filter messages with wrong magic 2009-04-23 03:33:58 +02:00
Kay Sievers
dacea9ff6b libudev: monitor - switch to filter_add_match_subsystem_devtype() 2009-04-23 03:24:38 +02:00
Kay Sievers
c7dff03e05 libudev: monitor - use simpler hash 2009-04-22 18:38:16 +02:00
Kay Sievers
a9550eb11f udevadm monitor - add --subsystem-match= 2009-04-22 05:00:15 +02:00
Kay Sievers
4277453fd2 update TODO 2009-04-22 04:32:25 +02:00
Kay Sievers
3111a33e95 udevadm: monitor - print error if we can not bind to socket 2009-04-22 04:11:18 +02:00
Kay Sievers
e14bdd88e9 libudev: monitor - add client socket filter for subsystem value
Messages send back by the udev daemon to the netlink socket are
multiplexed by the kernel and delivered to multiple clients. The
clients can upload a socket filter to let the kernel drop messages
not belonging to a certain subsystem. This prevent needless wakeups
and message processing for users who are only interested in a
subset of available events.

Recent kernels allow untrusted users to listen to the netlink
messages.

The messages send by the udev daemon are versioned, to prevent any
custom software reading them without libudev. The message wire format
may change with any udev version update.
2009-04-22 03:50:11 +02:00
Kay Sievers
540f46698d udevd: at startup create /dev/null, /dev/console, /dev/kmsg 2009-04-19 03:25:04 +02:00
Kay Sievers
f1986e09fc test-libudev: update monitor source 2009-04-18 13:23:10 +02:00
Kay Sievers
b44b7f8841 udevd: log error for too old kernels or CONFIG_SYSFS_DEPRECATED 2009-04-16 22:34:26 +02:00
Kay Sievers
ff109b8ded libudev: monitor - clarify socket handling documentation 2009-04-16 01:49:16 +02:00
Kay Sievers
3e5bafc98a libudev: path_encode - always return 0 if encoded string does not fit into size 2009-04-15 21:47:04 +02:00
Scott James Remnant
e86a923d50 libudev: monitor - ignore messages from unusual sources
For added protection, ignore any unicast message received on the
netlink socket or any multicast message on the kernel group not
received from the kernel.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
2009-04-08 16:16:14 -07:00
Kay Sievers
e2b362d9f2 libudev: monitor - unify socket message handling 2009-04-08 07:46:54 -07:00
Kay Sievers
662c311080 path_encode: fix max length calculation
Sebastian Krahmer wrote:
> it should reserve 4 times not 3 times len :)
2009-04-08 06:06:01 -07:00
Alan Jenkins
4b09a2fc43 avoid leaking netlink socket fd to external programs
The netlink socket is now used by udev event processes. We should take
care not to pass it to the programs they execute. This is the same way
the inotify fd was handled.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-04-06 07:23:35 -07:00
Kay Sievers
52761bb0a9 IMPORT: 2048 -> 4096 bytes buffer 2009-03-30 20:09:08 +02:00
Kay Sievers
f2b937440c "UDEV_MONITOR_KERNEL/UDEV" -> "kernel/udev" 2009-03-29 20:08:52 +02:00
Kay Sievers
116254097a send monitor events back to netlink socket
Instead of of our own private monitor socket, we send the
processed event back to our netlink socket, to the multicast
group 2 -- so any number of users can listen to udev events,
just like they can listen to kernel emitted events on group 1.
2009-03-29 04:24:39 +02:00
Kay Sievers
4061ab9f4b libudev: GPL -> LGPL 2009-03-26 19:29:36 +01:00
Kay Sievers
498c2750bf udevadm: monitor - clarify printed header 2009-03-18 18:47:23 +01:00
Kay Sievers
f454f6708a udevadm: test - handling trailing '/' in devpath
On Wed, Mar 18, 2009 at 16:00, Matthias Schwarzott <zzam@gentoo.org> wrote:
found out how the error occurs:
It is a difference between
A. udevadm test /sys/class/mem/null/
and
B. udevadm test /sys/class/mem/null

Case A was the case that showed the error behaviour. It seems udevadm is
confused by the trailing slash. This behaviour seems to be there since ages.
2009-03-18 18:42:16 +01:00
Robby Workman
1d59ba4077 udevadm: trigger - add "--action" to --help 2009-03-17 10:31:32 +01:00
Scott James Remnant
bb38678e3c udevadm: settle - synchronise with the udev daemon
There's still a slight race condition when using udevadm settle, if the
udev daemon has a pending inotify event but hasn't yet generated the
"change" uevent for it, the kernel and udev sequence numbers will match
and settle will exit.

Now udevadm settle will send a control message to udevd, which will
respond by sending SIGUSR1 back to the waiting udevadm settle once it
has completed the main loop iteration in which it received the control
message.

If there were no pending inotify events, this will simply wake up the
udev daemon and allow settle to continue.  If there are pending inotify
events, they are handled first in the main loop so when settle is
continued they will have been turned into uevents and the kernel
sequence number will have been incremented.

Since the inotify event is pending for udevd when the close() system
call returns (it's queued as part of the kernel handling for that system
call), and since the kernel sequence number is incremented by writing to
the uevent file (as udevd does), this solves the race.

When the settle continues, if there were pending inotify events that
udevd had not read, they are now pending uevents which settle can wait
for.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
2009-03-12 10:02:37 +00:00
Kay Sievers
c2c24d4d3c udevadm: settle - use timeout signal, instead of loop counter 2009-03-11 15:06:14 +01:00
Kay Sievers
89d080c3ae libudev: ctrl - return error after sending ctrl message 2009-03-11 13:32:39 +01:00
Kay Sievers
f1e7e36046 udevadm: add text for new options to command and man page 2009-03-07 02:32:40 +01:00
Kay Sievers
45bcd16ca5 udevd: switch watch symlinks to devpath
Some broken tools get confused following links to /sys, switch
to link targets carrying the devpath instead of the syspath, like
the queue links.
2009-03-05 00:35:58 +01:00
Kay Sievers
98d3d51715 udevadm: settle - add --seq-start= --seq-end=
It might be useful in some cases not to wait for "all" events.

  $ read START < /sys/kernel/uevent_seqnum
  $ (do something which may create uevents)
  $ udevadm settle --seq-start=$START
2009-03-04 23:48:53 +01:00
Kay Sievers
a5d8cffad9 libudev: queue - use lstat() to check existence of symlink 2009-03-04 23:32:16 +01:00
Michael Prokop
2236ddae2d fix compile error in debug mode
When building with './configure --enable-debug && make' it fails with:
  udev-rules.c: In function ‘dump_token’:
  udev-rules.c:366: error: ‘struct <anonymous>’ has no member named ‘i’

Signed-off-by: Michael Prokop <mika@grml.org>
2009-03-03 17:27:00 +01:00
Kay Sievers
b38a5801f9 udevadm: info - export all devices with --export-db 2009-02-26 22:59:40 +01:00
Kay Sievers
46f194cbde add "nowatch" to disable a default installed watch with a later rule 2009-02-25 11:18:15 +01:00
Kay Sievers
3d3a0a709a use the event udev_device to disable the watch on "remove" 2009-02-24 15:11:17 +01:00
Kay Sievers
d5d04d4f9f remove static local variable 2009-02-24 12:58:48 +01:00
Scott James Remnant
80be8c48c5 Look at more inotify events in the buffer than just the first. 2009-02-23 18:33:49 +00:00
Scott James Remnant
b8e96d67a2 lookup the old watch handle; reload only if has a path 2009-02-23 17:59:01 +00:00
Scott James Remnant
c08337da5c Output watch handle in udevadm info. 2009-02-23 17:48:18 +00:00
Scott James Remnant
9ce462721a Put a log message in a more sensible place. 2009-02-23 17:46:00 +00:00
Scott James Remnant
047f88bca3 Use the udevdb to speed up watch clearing.
Also return a udev_device when looking up by handle as well, so
everything works the same way.
2009-02-23 17:43:53 +00:00
Scott James Remnant
25bdd197ec Store watch handle in db. 2009-02-23 17:34:07 +00:00
Scott James Remnant
d7ce7539d3 Allow watch handle to be stored in the udevdb. 2009-02-23 17:31:26 +00:00
Scott James Remnant
03e0170db3 Cleanup a little.
Move some of the checks into udev_watch_begin() and udev_watch_clear()
so we don't have to repeat them all the time.
2009-02-23 17:21:24 +00:00
Scott James Remnant
521b3a9211 Clear existing inotify watch before processing.
Likewise when re-processing an event, we want to drop the existing
inotify watch first to avoid side-effects.
2009-02-23 17:19:05 +00:00
Scott James Remnant
5ae82640c5 Don't add inotify watch until RUN rules processed.
The programs we RUN can open device nodes, and thus we can end up
chasing our own tail.
2009-02-23 17:17:20 +00:00
Kay Sievers
64746532e8 rules: add "watch" option to dm and md rules 2009-02-13 16:02:36 +01:00
Kay Sievers
4aca304e48 use global "reload_config" flag 2009-02-11 21:56:35 +01:00
Scott James Remnant
bd284db142 udevd: optionally watch device nodes with inotify
This allows you to re-process the rules if the content of the device
has been changed, most useful for block subsystem to cause vol_id to
be run again.
2009-02-11 17:38:56 +00:00
Kay Sievers
10b2d011e7 fix NAME= and OPTION+="string_escape=..." logic
Scott discovered this silly bug.
2009-02-08 16:02:15 +01:00
Kay Sievers
a402404fb2 test: add test for empty and non-existent ATTR 2009-02-05 12:40:15 +01:00
Kay Sievers
647f7c49e8 fix NAME="" logic
Reported-By: Soh Kam Yung <sohkamyung@gmail.com>
2009-01-30 03:53:09 +01:00
Kay Sievers
722af2d0d3 man: fix grammar
Reported-by: Robert Peterson <rpeterso@redhat.com>
2009-01-25 21:21:43 +01:00
Kay Sievers
c2de781ef0 udevadm: settle - fix typo 2009-01-23 02:19:12 +01:00
Kay Sievers
5db88229d1 udevd: add back SA_RESTART
<Keybuk> poll, select, ppoll, pselect, epoll, etc. are *explicitly* NOT restarted in case of signal
<kay> ok
2009-01-21 18:55:59 +01:00
Kay Sievers
6469c77216 split up long line 2009-01-21 15:11:38 +01:00
Kay Sievers
4b0faa2aa0 Merge commit '9032f119f07ad3b5116b3d4858816d851d4127de' 2009-01-21 14:43:22 +01:00
Kay Sievers
2c7b88c4a5 Merge commit '5f03ed8a56d308af72db8a48ab66ed68667af2c6'
Conflicts:
	udev/udevd.c
2009-01-21 14:42:30 +01:00
Kay Sievers
c807ad918c increase netif renaming timeout from 30 to 90 seconds 2009-01-21 11:17:58 +01:00
Olaf Kirch
d1cc6562f3 reap children faster
udevd's event_queue_manager loop is pretty sensitive to the
delays of exiting child processes. I found that it helps boot
times if we try to reap children as quickly as possible.

This patch changes event_queue_manager to call sigchilds_waiting
if it finds a signal has been received.

Signed-off-by: Olaf Kirch <okir@suse.de>
2009-01-21 11:17:11 +01:00
Kay Sievers
e9a77fd828 open-code pollfd setup 2009-01-21 11:09:27 +01:00
Scott James Remnant
9032f119f0 Expose delayed name resolution
udevd had the ability to delay name resolution until the event, but this
was never exposed.  Add a --resolve-names=late option to do so.
2009-01-20 21:36:09 +00:00
Scott James Remnant
5f03ed8a56 Allow user and group lookup to be disabled.
In certain cut-down situations such as an installer or inside the
initramfs, we simply don't have any kind of name service.  While we
could use rules without OWNER or GROUP, it's better to have the same
rules as a full system and have udevd ignore those parts of the rules.

Adds a --resolve-names=never switch to udevd that has this effect.
2009-01-20 21:33:02 +00:00
Olaf Kirch
3210a72ba3 udevd: use ppoll instead of signal pipes
udevd uses a rather old-fashioned way of handling signals
while waiting for input through select (ie by using an unnamed
pipe, to which the signal handler writes one byte for every signal
received). This is rather awkward and may potentially even block
if we receive more signals than the kernel's pipe buffer.

This patch replaces all of that with ppoll, which was designed
for this purpose.

It also removes the SA_RESTART flag from all installed signal
handlers, because otherwise the ppoll call would just be restarted
after handling eg a SIGCHLD.

Signed-off-by: Olaf Kirch <okir@suse.de>
2009-01-20 12:49:20 +01:00
Alan Jenkins
a3ab20722d remove stray initializer
Picked up by "gcc -Wextra".

udevadm.c:83: warning: initialized field overwritten
udevadm.c:83: warning: (near initialization for ‘cmds[2].help’)

This is just a cleanup.  It doesn't change the code generated by gcc.
2009-01-16 21:33:33 +01:00
Alan Jenkins
e5e641518b man: typo fixes 2009-01-16 21:32:25 +01:00
Kay Sievers
fc7d16f993 cleanup old names before creating the new names
Scott found that the node /dev/pktcdvd can not be replaced by
/dev/pktcdvd/control by changing the rules, and re-trigger the
event. We used to create the new names before we cleaned up the
old ones, which can not work if we need to create subdir with
the same name.
2009-01-16 21:15:53 +01:00
Kay Sievers
8257730d39 remove name from index if the node name has changed
Scott discovered that a changed rule, which renames a device node
leaves the old node name around as a symlink. So drop the reference
to the old name.
2009-01-16 21:14:13 +01:00
Kay Sievers
ec2dd02e2a udevadm: test - remove --force option
Since a while we change the database with a "test" run, but do not update
the node and symlinks. We need to "force" all the time, to keep things
in sync.
2009-01-15 20:20:16 +01:00
Kay Sievers
92e52e2fd1 do not complain about a missing /etc/udev/rules.d/
Scott mentioned that initramfs does not neccessarily have that
directory, so do not log an error.
2009-01-15 17:52:17 +01:00
Kay Sievers
affed87af1 libudev: use 4096 bytes buffer for attribute reading 2009-01-14 21:54:31 +01:00
Kay Sievers
56c141eceb libudev: test - add udev_device_get_property_value() 2009-01-06 16:52:40 +01:00
Kay Sievers
3d7b2831cd libudev: device - add udev_device_get_property_value() 2009-01-06 00:26:28 +01:00
Kay Sievers
b620292bd2 udevadm: s/udevinfo/udevadm info/ 2009-01-05 12:28:09 +01:00
Kay Sievers
0c057e9c75 enable skipping of "naming-only" rules 2009-01-05 02:55:37 +01:00
Kay Sievers
58d882a6d7 libudev: subsytem -> subsystem 2009-01-03 15:24:59 +01:00
Marcel Holtmann
61ee8cc92d libudev: device - remove udev_device_get_parent_with_subsystem 2009-01-03 15:12:28 +01:00
Marcel Holtmann
883012d49b libudev: device - lookup subsystem and devtype together 2009-01-03 15:12:17 +01:00
Kay Sievers
b92511747a libudev: device - read "uevent" only if info is not already loaded 2009-01-03 04:55:15 +01:00
Michal Soltys
db71b500b2 man: udev - update NAME assignment 2009-01-02 14:07:54 +01:00
Marcel Holtmann
bf8b2ae177 libudev: device - add devtype support 2009-01-02 04:37:04 +01:00
Kay Sievers
f089350234 libudev: enumerate - add lookup by property 2008-12-29 07:42:19 +01:00
Kay Sievers
64be143742 require non-SYSFS_DEPRECATED 2.6.20+ kernel 2008-12-29 06:04:09 +01:00
Kay Sievers
1028fe14b6 if needed, store database entries also for devices which do not have a device node 2008-12-28 01:49:01 +01:00
Kay Sievers
c4e63d5412 "'/sbin/modprobe abnormal' exit" - also print program options 2008-12-20 00:03:53 +01:00
Kay Sievers
4f06aaa9d8 libudev: include <sys/types.h> 2008-12-16 14:48:33 +01:00