chiark / gitweb /
elogind.git
10 years agovolume_id: fat - move check for msdos signature (0x55 0xaa)
Karel Zak [Thu, 13 Nov 2008 16:32:14 +0000 (17:32 +0100)]
volume_id: fat - move check for msdos signature (0x55 0xaa)

Make the msdos signature (0x55 0xaa) at 510 and 511 optional when
the standard FAT magic string is present.

10 years agoconfigure: add linux-hotplug mail address
Kay Sievers [Thu, 13 Nov 2008 07:16:55 +0000 (08:16 +0100)]
configure: add linux-hotplug mail address

10 years agoupdate NEWS
Kay Sievers [Thu, 13 Nov 2008 07:03:49 +0000 (08:03 +0100)]
update NEWS

10 years agorules: remove pnp shell script, acpi loads these modules properly
Kay Sievers [Thu, 13 Nov 2008 06:47:16 +0000 (07:47 +0100)]
rules: remove pnp shell script, acpi loads these modules properly

10 years agorules: remove DEVTYPE disk/partition
Kay Sievers [Thu, 13 Nov 2008 06:45:58 +0000 (07:45 +0100)]
rules: remove DEVTYPE disk/partition

10 years agoudevadm: info - unify -V and --version
Kay Sievers [Thu, 13 Nov 2008 06:31:04 +0000 (07:31 +0100)]
udevadm: info - unify -V and --version

10 years agoset errno = ENOSYS in inotify stub
Kay Sievers [Thu, 13 Nov 2008 00:52:33 +0000 (01:52 +0100)]
set errno = ENOSYS in inotify stub

10 years agoscsi_id: we don't use DEVPATH env var anymore, update man page
Alan Jenkins [Wed, 12 Nov 2008 16:23:17 +0000 (16:23 +0000)]
scsi_id: we don't use DEVPATH env var anymore, update man page

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agomerge trie nodes, childs and root into a single array
Kay Sievers [Wed, 12 Nov 2008 23:52:12 +0000 (00:52 +0100)]
merge trie nodes, childs and root into a single array

10 years agoreserve child slot 0
Kay Sievers [Wed, 12 Nov 2008 14:01:20 +0000 (15:01 +0100)]
reserve child slot 0

10 years agostring index - split nodes and childs to allow and unlimited number of childs
Kay Sievers [Wed, 12 Nov 2008 04:50:05 +0000 (05:50 +0100)]
string index - split nodes and childs to allow and unlimited number of childs

10 years agosilence "comparison between signed and unsigned"
Kay Sievers [Tue, 11 Nov 2008 22:47:01 +0000 (23:47 +0100)]
silence "comparison between signed and unsigned"

10 years agoudevd: de-duplicate strings in rules
Alan Jenkins [Tue, 11 Nov 2008 20:20:11 +0000 (20:20 +0000)]
udevd: de-duplicate strings in rules

On my Ubuntu installation this removes 15k of duplicate strings,
using a temporary index of about 25k.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agorelease 132
Kay Sievers [Fri, 7 Nov 2008 15:08:58 +0000 (16:08 +0100)]
release 132

10 years agoconvert debug string arrays to functions
Kay Sievers [Fri, 7 Nov 2008 14:59:58 +0000 (15:59 +0100)]
convert debug string arrays to functions

On Fri, Nov 7, 2008 at 13:07, Matthias Schwarzott <zzam@gentoo.org> wrote:
> I managed to let udev-131 segfault at startup.
>
> I configured it like this:
> CFLAGS="-Wall -ggdb" ./configure --prefix=/usr --sysconfdir=/etc --exec-prefix=
>
> Running it in gdb shows it segfaults at udev-rules.c:831
>
> (gdb) run
> Starting program: /tmp/udev-131/udev/udevd
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0804ea06 in get_key (udev=0x9175008, line=0xafcdc8f0, key=0xafcdc5d8,
> op=0xafcdc5d0, value=0xafcdc5d4)
>    at udev-rules.c:831
> 831             dbg(udev, "%s '%s'-'%s'\n", operation_str[*op], *key, *value);

If compiled without optimization, the dbg() macro dereferences variables
which are not available. Convert the string array to a function, which just
returns NULL if compiled without DEBUG.

10 years agofix size_t compiler warning on 32 bit platforms
Kay Sievers [Fri, 7 Nov 2008 01:58:54 +0000 (02:58 +0100)]
fix size_t compiler warning on 32 bit platforms

10 years agorelease 131
Kay Sievers [Fri, 7 Nov 2008 01:36:20 +0000 (02:36 +0100)]
release 131

10 years agoudevadm: settle - exit if udevd exits
Kay Sievers [Thu, 6 Nov 2008 18:41:58 +0000 (19:41 +0100)]
udevadm: settle - exit if udevd exits

10 years agocleanup /dev/.udev/queue on startup and exit
Kay Sievers [Thu, 6 Nov 2008 16:43:12 +0000 (17:43 +0100)]
cleanup /dev/.udev/queue on startup and exit

10 years agorules: md - add mdadm 3 device naming
Kay Sievers [Thu, 6 Nov 2008 07:17:33 +0000 (08:17 +0100)]
rules: md - add mdadm 3 device naming

10 years agofix indentation
Kay Sievers [Thu, 6 Nov 2008 01:56:45 +0000 (02:56 +0100)]
fix indentation

10 years agoudevd: shrink struct token to 12 bytes
Alan Jenkins [Wed, 5 Nov 2008 21:28:52 +0000 (22:28 +0100)]
udevd: shrink struct token to 12 bytes

10 years ago$links should be relative
Kay Sievers [Wed, 5 Nov 2008 21:13:49 +0000 (22:13 +0100)]
$links should be relative

10 years agounify string replacement
Kay Sievers [Wed, 5 Nov 2008 20:49:52 +0000 (21:49 +0100)]
unify string replacement

10 years agousb_id: MassStorage SubClass 6 is "scsi" not "disk"
Kay Sievers [Wed, 5 Nov 2008 18:02:56 +0000 (19:02 +0100)]
usb_id: MassStorage SubClass 6 is "scsi" not "disk"

10 years agodo not import the "uevent" file when we only read the db to get old symlinks
Kay Sievers [Wed, 5 Nov 2008 11:23:06 +0000 (12:23 +0100)]
do not import the "uevent" file when we only read the db to get old symlinks

10 years agofix cleanup of possible left-over symlinks
Kay Sievers [Wed, 5 Nov 2008 03:45:23 +0000 (04:45 +0100)]
fix cleanup of possible left-over symlinks

10 years agofix $links substitution
Kay Sievers [Wed, 5 Nov 2008 03:08:44 +0000 (04:08 +0100)]
fix $links substitution

10 years agoinfo() PROGRAM and IMPORT execution
Kay Sievers [Wed, 5 Nov 2008 03:05:17 +0000 (04:05 +0100)]
info() PROGRAM and IMPORT execution

10 years agovolume_id: btrfs update
Kay Sievers [Wed, 5 Nov 2008 01:22:07 +0000 (02:22 +0100)]
volume_id: btrfs update

10 years agofix list handling in enumerate and rules file sorting
Kay Sievers [Tue, 4 Nov 2008 19:19:01 +0000 (20:19 +0100)]
fix list handling in enumerate and rules file sorting

10 years agofirmware.sh: record missing files in /dev/.udev/firmware-missing/
Kay Sievers [Tue, 4 Nov 2008 17:38:06 +0000 (18:38 +0100)]
firmware.sh: record missing files in /dev/.udev/firmware-missing/

10 years agomove debugging strings inside #ifdef DEBUG
Kay Sievers [Sat, 1 Nov 2008 20:05:25 +0000 (21:05 +0100)]
move debugging strings inside #ifdef DEBUG

10 years agoadd "devel" and "install" switches to autogen.sh
Kay Sievers [Sat, 1 Nov 2008 19:57:22 +0000 (20:57 +0100)]
add "devel" and "install" switches to autogen.sh

10 years agomove some info() to dbg()
Kay Sievers [Sat, 1 Nov 2008 19:16:24 +0000 (20:16 +0100)]
move some info() to dbg()

10 years agofix udev_node_update_old_links() logic
Kay Sievers [Sat, 1 Nov 2008 19:05:41 +0000 (20:05 +0100)]
fix udev_node_update_old_links() logic

No need to check if links that still belong to us, need to be updated.

10 years agoskip entire rule containing device naming keys, if no device can be named
Kay Sievers [Sat, 1 Nov 2008 18:12:20 +0000 (19:12 +0100)]
skip entire rule containing device naming keys, if no device can be named

If rules set NAME, SYMLINK, OWNER, GROUP, MODE, events without a device node
and remove events will skip the entire rule. The old parser did the same.

10 years agolog rules file and line number when NAME, SYMLINK, OWNER, GROUP, MODE, RUN is applied
Kay Sievers [Sat, 1 Nov 2008 17:34:54 +0000 (18:34 +0100)]
log rules file and line number when NAME, SYMLINK, OWNER, GROUP, MODE, RUN is applied

10 years agoudevd: be more careful when matching against parents
Alan Jenkins [Sat, 1 Nov 2008 16:32:16 +0000 (17:32 +0100)]
udevd: be more careful when matching against parents

I'm worried about what will happen with things like

KERNELS=="*" # pointless rule
KERNELS=="doesnt-match" # another pointless rule

Since TK_RULE < TK_M_PARENTS_MAX, we will try to match all three tokens
against parents of the current device.  I can't think of a bad case,
but it's not exactly good either.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agoudevd: fix termination of rule execution
Alan Jenkins [Sat, 1 Nov 2008 16:09:16 +0000 (16:09 +0000)]
udevd: fix termination of rule execution

LAST_RULE was broken, and I broke TK_END by making it do the same.
It used a "break" which exited the switch statement, but not the loop!

==2953== Invalid read of size 4
==2953==    at 0x4081EE: dump_token (udev-rules.c:859)
==2953==    by 0x40BADB: udev_rules_apply_to_event (udev-rules.c:1849)
==2953==    by 0x403F17: udev_event_execute_rules (udev-event.c:554)
==2953==    by 0x418626: main (test-udev.c:100)
==2953==  Address 0x55ab1f8 is 0 bytes after a block of size 80 alloc'd
==2953==    at 0x4C23082: realloc (vg_replace_malloc.c:429)
==2953==    by 0x40B13B: udev_rules_new (udev-rules.c:1670)
==2953==    by 0x418536: main (test-udev.c:84)
...

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agowrite trace log to stderr
Kay Sievers [Fri, 31 Oct 2008 15:22:55 +0000 (16:22 +0100)]
write trace log to stderr

10 years agofstab_import: add "change" event match
Kay Sievers [Thu, 30 Oct 2008 15:41:47 +0000 (16:41 +0100)]
fstab_import: add "change" event match

10 years agoedd_id: add "change" event match
Kay Sievers [Thu, 30 Oct 2008 15:41:27 +0000 (16:41 +0100)]
edd_id: add "change" event match

10 years agorules: remove "add" match from usb device node rule
Kay Sievers [Thu, 30 Oct 2008 15:11:49 +0000 (16:11 +0100)]
rules: remove "add" match from usb device node rule

10 years agorules: remove SCSI timeouts
Kay Sievers [Thu, 30 Oct 2008 08:20:03 +0000 (09:20 +0100)]
rules: remove SCSI timeouts

On Thu, Oct 30, 2008 at 03:55, Tejun Heo <tj@kernel.org> wrote:
The appropriate default timeout differs depending on the transport and
the type of the attached device, so the above two rules harm more than
help.  The affect of the above two rules weren't visible for some
reason but with recent block layer timeout update, they actually work
and cause problems.

10 years agoATTR{}== always fails if the attribute does not exist
Kay Sievers [Wed, 29 Oct 2008 21:22:12 +0000 (22:22 +0100)]
ATTR{}== always fails if the attribute does not exist

10 years agoudevd: merge exec and run queue to minimize devpath string compares
Kay Sievers [Wed, 29 Oct 2008 16:32:13 +0000 (17:32 +0100)]
udevd: merge exec and run queue to minimize devpath string compares

10 years agoudevd: simplify rules execution loop
Alan Jenkins [Tue, 28 Oct 2008 08:58:18 +0000 (08:58 +0000)]
udevd: simplify rules execution loop

cur can't become NULL, and the check for TK_END
can be folded into the switch statement.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agoupdate NEWS
Kay Sievers [Tue, 28 Oct 2008 01:26:35 +0000 (02:26 +0100)]
update NEWS

10 years agokerneldoc comment fixes
Alan Jenkins [Sun, 26 Oct 2008 14:48:48 +0000 (14:48 +0000)]
kerneldoc comment fixes

s/ressources/resources/

Also reduce commas per sentence and add a possessive apostrophe.

10 years agolibudev: device - allocate envp array only once
Kay Sievers [Sun, 26 Oct 2008 13:31:46 +0000 (14:31 +0100)]
libudev: device - allocate envp array only once

10 years agotest: add RUN+="socket: ..." to a test to run monitor code
Kay Sievers [Sun, 26 Oct 2008 03:35:32 +0000 (04:35 +0100)]
test: add RUN+="socket: ..." to a test to run monitor code

10 years agolibudev: device - fill envp array while composing monitor buffer
Kay Sievers [Sun, 26 Oct 2008 02:39:41 +0000 (03:39 +0100)]
libudev: device - fill envp array while composing monitor buffer

Thanks to Alan Jenkins, for the idea.

10 years agofix $attr{[<subsystem>/<sysname>]<attribute>} substitution
Kay Sievers [Sun, 26 Oct 2008 01:48:14 +0000 (02:48 +0100)]
fix $attr{[<subsystem>/<sysname>]<attribute>} substitution

10 years agodo not init string arrays, just clear first byte
Kay Sievers [Sun, 26 Oct 2008 01:31:54 +0000 (02:31 +0100)]
do not init string arrays, just clear first byte

10 years agomatch_attr() - copy attr value only when needed
Kay Sievers [Sun, 26 Oct 2008 01:16:54 +0000 (02:16 +0100)]
match_attr() - copy attr value only when needed

10 years agoudevd: avoid implicit memset in match_attr()
Alan Jenkins [Sat, 25 Oct 2008 14:51:19 +0000 (15:51 +0100)]
udevd: avoid implicit memset in match_attr()

Initializing a char array to "" is equivalent to a memset()
call - which is exactly what it gets compiled to.

Fixing this one callsite reduced memset() _user_ cpu cycles
from 2-4% to 0.05% on the EeePC.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agoudevd: use a tighter loop for compare_devpath()
Alan Jenkins [Sat, 25 Oct 2008 16:01:21 +0000 (17:01 +0100)]
udevd: use a tighter loop for compare_devpath()

This crops up in my threaded udevd profiles from time to time.
It's not consistent - probably due to variations in the number
of concurrent events - but it can hit 4% user time and higher.

The change halves the user time spent in compare_devpath().

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agofix handling of string_escape option
Alan Jenkins [Sat, 25 Oct 2008 13:19:48 +0000 (15:19 +0200)]
fix handling of string_escape option

10 years agomatch KEY="A|B" without temporary string copy
Kay Sievers [Sat, 25 Oct 2008 01:00:03 +0000 (03:00 +0200)]
match KEY="A|B" without temporary string copy

10 years agoremove debug printf
Kay Sievers [Fri, 24 Oct 2008 16:09:13 +0000 (18:09 +0200)]
remove debug printf

10 years agofix "unused" warnings
Kay Sievers [Fri, 24 Oct 2008 15:42:31 +0000 (17:42 +0200)]
fix "unused" warnings

10 years agolibudev: monitor - cache result of monitor send buffer
Kay Sievers [Fri, 24 Oct 2008 14:36:27 +0000 (16:36 +0200)]
libudev: monitor - cache result of monitor send buffer

10 years agolibudev: monitor - replace far too expensive snprintf() with strlcpy()
Kay Sievers [Fri, 24 Oct 2008 13:09:43 +0000 (15:09 +0200)]
libudev: monitor - replace far too expensive snprintf() with strlcpy()

10 years agospecial-case "?*" match to skip fnmatch()
Kay Sievers [Fri, 24 Oct 2008 12:19:42 +0000 (14:19 +0200)]
special-case "?*" match to skip fnmatch()

10 years agodetermine at rule parse time if we need to call fnmatch()
Kay Sievers [Fri, 24 Oct 2008 11:32:32 +0000 (13:32 +0200)]
determine at rule parse time if we need to call fnmatch()

This cuts down the large rule set's 120.000 calls to fnmatch() to
51.000, and we can just call strcmp for the simple matches.

10 years agodistinguish "match" from "assign" by (op < OP_MATCH_MAX)
Kay Sievers [Fri, 24 Oct 2008 09:38:05 +0000 (11:38 +0200)]
distinguish "match" from "assign" by (op < OP_MATCH_MAX)

10 years agocache uid/gid during rule parsing
Kay Sievers [Fri, 24 Oct 2008 08:51:04 +0000 (10:51 +0200)]
cache uid/gid during rule parsing

This cuts down the number of parsing /etc/group from ~700 to 11,
with some large rule files installed.

10 years agofix uninitialized variable warnings
Kay Sievers [Fri, 24 Oct 2008 07:37:37 +0000 (09:37 +0200)]
fix uninitialized variable warnings

10 years agorules: let empty strings added to buffer always return offset 0
Kay Sievers [Fri, 24 Oct 2008 06:07:37 +0000 (08:07 +0200)]
rules: let empty strings added to buffer always return offset 0

10 years agoskip SYMLINK rules for devices without a device node
Kay Sievers [Thu, 23 Oct 2008 19:42:23 +0000 (21:42 +0200)]
skip SYMLINK rules for devices without a device node

10 years agoudevd: fix WAIT_FOR_SYSFS execution order
Alan Jenkins [Thu, 23 Oct 2008 18:37:30 +0000 (19:37 +0100)]
udevd: fix WAIT_FOR_SYSFS execution order

The wait should be ordered after matching KERNEL, ENV, etc.
but before ATTR.

Without this, WAIT_FOR_SYSFS rules will be applied unconditionally
to all events.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agorule_generator: fix netif NAME= value extraction regex
Kay Sievers [Thu, 23 Oct 2008 13:44:34 +0000 (15:44 +0200)]
rule_generator: fix netif NAME= value extraction regex

  $ sed -n -r \
    -e 's/^#.*//' \
    -e 's/[[:space:],]NAME="(eth[0-9]*)"[[:space:]]*(,.*|\\|)$/\1/p' \
    /dev/null /etc/udev/rules.d/70-persistent-net.rules
  SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:41:e2:8d:c7", ATTR{type}=="1", KERNEL=="eth*",eth4

  $ sed -n -r \
    -e 's/^#.*//' \
    -e 's/.*[[:space:],]NAME="(eth[0-9]*)".*/\1/p' \
    /dev/null /etc/udev/rules.d/70-persistent-net.rules
  eth4

10 years agoudevd: fix memory leak
Alan Jenkins [Thu, 23 Oct 2008 09:27:36 +0000 (10:27 +0100)]
udevd: fix memory leak

Re: b99028c96307e729303be8f6750418979a7488b9 shrink struct udev_event

TEST 136: test multi matches 2
device '/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0' expecting node 'right'
==15011==
==15011== 7 bytes in 1 blocks are definitely lost in loss record 1 of 1
==15011==    at 0x47F9AB8: malloc (vg_replace_malloc.c:207)
==15011==    by 0x489CB5F: strdup (in /lib32/libc-2.7.so)
==15011==    by 0x8050F40: udev_rules_apply_to_event (udev-rules.c:1973)
==15011==    by 0x804A658: udev_event_execute_rules (udev-event.c:549)
==15011==    by 0x805A636: main (test-udev.c:100)
add:         ok
==15012==
==15012== 7 bytes in 1 blocks are definitely lost in loss record 1 of 1
==15012==    at 0x47F1AB8: malloc (vg_replace_malloc.c:207)
==15012==    by 0x4898B5F: strdup (in /lib32/libc-2.7.so)
==15012==    by 0x8050F40: udev_rules_apply_to_event (udev-rules.c:1973)
==15012==    by 0x804A9DF: udev_event_execute_rules (udev-event.c:658)
==15012==    by 0x805A636: main (test-udev.c:100)
remove:      ok

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agoshrink struct udev_event
Kay Sievers [Thu, 23 Oct 2008 00:57:08 +0000 (02:57 +0200)]
shrink struct udev_event

10 years agoshrink struct udev_event
Kay Sievers [Thu, 23 Oct 2008 00:34:22 +0000 (02:34 +0200)]
shrink struct udev_event

10 years agodo not create temporary node ($tempnode) if node already exists
Kay Sievers [Wed, 22 Oct 2008 23:13:52 +0000 (01:13 +0200)]
do not create temporary node ($tempnode) if node already exists

10 years agoreplace in-memory rules array with match/action token list
Kay Sievers [Wed, 22 Oct 2008 22:13:59 +0000 (00:13 +0200)]
replace in-memory rules array with match/action token list

The in-memory rule array of a common desktop distro install took:
  1151088 bytes
with the token list:
  109232 bytes tokens (6827 * 16 bytes), 71302 bytes buffer

10 years agohandle numerical owner/group string in lookup_user/group()
Kay Sievers [Wed, 22 Oct 2008 21:59:53 +0000 (23:59 +0200)]
handle numerical owner/group string in lookup_user/group()

10 years agouse re-entrant variants of getpwnam and getgrnam
Alan Jenkins [Wed, 22 Oct 2008 14:13:08 +0000 (15:13 +0100)]
use re-entrant variants of getpwnam and getgrnam

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agoadd util_resolve_subsys_kernel()
Kay Sievers [Wed, 22 Oct 2008 16:03:38 +0000 (18:03 +0200)]
add util_resolve_subsys_kernel()

10 years agovolume_id: swap - larger PAGE_SIZE support
Matthias Koenig [Wed, 22 Oct 2008 09:45:27 +0000 (11:45 +0200)]
volume_id: swap - larger PAGE_SIZE support

10 years agoreplace strncpy() with strlcpy()
Alan Jenkins [Tue, 21 Oct 2008 21:42:15 +0000 (22:42 +0100)]
replace strncpy() with strlcpy()

The problem was strncpy() doesn't stop after writing the terminating
NUL; by definition it goes on to zero the entire buffer.

I spy another use of strncpy in udev_device_add_property_from_string(),
which is responsible for another ~1% user cpu time...

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agolibudev: device - 128 -> ENVP_SIZE
Kay Sievers [Tue, 21 Oct 2008 11:58:19 +0000 (13:58 +0200)]
libudev: device - 128 -> ENVP_SIZE

10 years agolibudev: allocate udev_device->envp[] dynamically
Alan Jenkins [Tue, 21 Oct 2008 10:11:41 +0000 (11:11 +0100)]
libudev: allocate udev_device->envp[] dynamically

Measured 2% _user_ cpu time reduction on EeePC coldplug.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agolibudev: util - optimize path_encode()
Alan Jenkins [Tue, 21 Oct 2008 10:12:57 +0000 (11:12 +0100)]
libudev: util - optimize path_encode()

Since we already know the length, use memcpy() instead.
Measured 2% _user_ cpu time reduction on EeePC coldplug.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agouse more appropriate alternatives to malloc()
Alan Jenkins [Tue, 21 Oct 2008 10:10:32 +0000 (11:10 +0100)]
use more appropriate alternatives to malloc()

Use calloc to request cleared memory instead.
Kernel and libc conspire to make this more efficient.

Also, replace one malloc() + strcpy() with strdup().

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
10 years agodo not use the new work-in-progress parser rule matcher
Kay Sievers [Tue, 21 Oct 2008 10:45:54 +0000 (12:45 +0200)]
do not use the new work-in-progress parser rule matcher

10 years agoadd "root" == 0 shortcuts to lookup_user/group()
Kay Sievers [Tue, 21 Oct 2008 10:43:07 +0000 (12:43 +0200)]
add "root" == 0 shortcuts to lookup_user/group()

10 years agoreplace missing get_attr_value() -> get_sysattr_value()
Kay Sievers [Tue, 21 Oct 2008 10:42:13 +0000 (12:42 +0200)]
replace missing get_attr_value() -> get_sysattr_value()

10 years agocdrom_id: remove ARRAY_SIZE() declaration
Kay Sievers [Tue, 21 Oct 2008 10:40:47 +0000 (12:40 +0200)]
cdrom_id: remove ARRAY_SIZE() declaration

10 years agolibudev: device - get_attr_value() -> get_sysattr_value()
Kay Sievers [Mon, 20 Oct 2008 16:12:36 +0000 (18:12 +0200)]
libudev: device - get_attr_value() -> get_sysattr_value()

10 years agopass make distcheck
Kay Sievers [Sat, 18 Oct 2008 18:33:06 +0000 (20:33 +0200)]
pass make distcheck

10 years agoprefix udev-util.c functions with util_*
Kay Sievers [Sat, 18 Oct 2008 18:12:55 +0000 (20:12 +0200)]
prefix udev-util.c functions with util_*

10 years agoselinux_init(udev) -> udev_selinux_init(udev)
Kay Sievers [Sat, 18 Oct 2008 17:30:42 +0000 (19:30 +0200)]
selinux_init(udev) -> udev_selinux_init(udev)

10 years agoudev_list_cleanup() -> udev_list_cleanup_entries()
Kay Sievers [Sat, 18 Oct 2008 17:27:38 +0000 (19:27 +0200)]
udev_list_cleanup() -> udev_list_cleanup_entries()

10 years agomove udev_rules_apply_format() to udev-event.c
Kay Sievers [Sat, 18 Oct 2008 17:19:56 +0000 (19:19 +0200)]
move udev_rules_apply_format() to udev-event.c

10 years agoudev_rules_run() -> udev_event_execute_run();
Kay Sievers [Sat, 18 Oct 2008 13:50:16 +0000 (15:50 +0200)]
udev_rules_run() -> udev_event_execute_run();

10 years agoudev_event_run() -> udev_event_execute_rules()
Kay Sievers [Sat, 18 Oct 2008 13:46:55 +0000 (15:46 +0200)]
udev_event_run() -> udev_event_execute_rules()

10 years agoudevd: avoid overhead of calling rmdir on non-empty directories
Alan Jenkins [Sat, 18 Oct 2008 12:39:04 +0000 (13:39 +0100)]
udevd: avoid overhead of calling rmdir on non-empty directories

Unfortunately the linux rmdir implementation unhashes the dentry
even when the directory is not removed.  This is apparently by
design (for filesystems that don't allow deleting open files).

Results from time(1) and oprofile follow.

Before:

0.35user 0.90system
samples  %        image name               symbol name
608       9.6738  vmlinux                  shrink_dcache_parent
293       4.6619  vmlinux                  copy_page_c
271       4.3119  vmlinux                  copy_page_range
257       4.0891  udevd                    udev_rules_iter_next

After:

0.31user 0.67system
samples  %        image name               symbol name
361       5.0419  vmlinux                  copy_page_range
322       4.4972  udevd                    udev_rules_iter_next
300       4.1899  vmlinux                  copy_page_c

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>