1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

115 Commits

Author SHA1 Message Date
Kay Sievers
b99028c963 shrink struct udev_event 2008-10-23 02:57:08 +02:00
Alan Jenkins
111e4f81ff 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>
2008-10-21 23:55:13 +02:00
Kay Sievers
9a23e9e775 libudev: device - 128 -> ENVP_SIZE 2008-10-21 13:58:19 +02:00
Alan Jenkins
be18918f65 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>
2008-10-21 13:56:23 +02:00
Alan Jenkins
fa0e955a93 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>
2008-10-21 13:09:31 +02:00
Alan Jenkins
b29a5e4ab9 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>
2008-10-21 12:54:57 +02:00
Kay Sievers
69239210be libudev: device - get_attr_value() -> get_sysattr_value() 2008-10-20 18:12:36 +02:00
Kay Sievers
54808d77a3 prefix udev-util.c functions with util_* 2008-10-18 20:12:55 +02:00
Kay Sievers
eb8837e15c udev_list_cleanup() -> udev_list_cleanup_entries() 2008-10-18 19:27:38 +02:00
Kay Sievers
9dcf7ec8a0 libudev: make list_node functions available 2008-10-17 18:59:08 +02:00
Kay Sievers
b692a75089 libudev: ctrl - change magic to integer 2008-10-17 17:32:17 +02:00
Kay Sievers
cb25a9585d libudev: monitor - add set_receive_buffer_size() 2008-10-17 16:49:27 +02:00
Kay Sievers
bdeab5c7fd libudev: add sysnum to test program 2008-10-17 13:54:14 +02:00
Alan Jenkins
babcf3cb22 libudev: fix sysnum logic for digit-only device names 2008-10-17 13:19:54 +02:00
Kay Sievers
3feeb77c97 libudev: list - prepend udev_* to all functions 2008-10-17 01:39:10 +02:00
Kay Sievers
be7f7f5701 fix sorting of rules files 2008-10-16 21:12:08 +02:00
Kay Sievers
daa849db6f udev-rules-parse: name_list -> udev_list 2008-10-16 20:12:16 +02:00
Kay Sievers
3361a0f110 libudev: monitor - export MAJOR/MINOR only if available 2008-10-16 18:56:19 +02:00
Kay Sievers
3fb629fd5e libudev: always add UDEV_LOG 2008-10-16 18:51:05 +02:00
Kay Sievers
fc233a874b move udev_device_db to libudev 2008-10-16 17:30:06 +02:00
Kay Sievers
aa8734ffcb udevd: use libudev 2008-10-16 17:16:58 +02:00
Kay Sievers
ebacd6ecc3 libudev: device - copy global properties, unset empty properties 2008-10-16 13:53:16 +02:00
Kay Sievers
f183b6ed76 libudev: add global property list 2008-10-16 13:51:29 +02:00
Kay Sievers
6a95b1e7d6 libudev: ctrl - fix typo in set_env() 2008-10-16 13:34:11 +02:00
Kay Sievers
2c09b3b41d libudev: list - handle update of key with NULL value 2008-10-16 13:33:13 +02:00
Kay Sievers
31f4b036ea libudev: device - export properties when values are set 2008-10-16 11:37:22 +02:00
Kay Sievers
5c5cad7966 libudev: device - lookup "subsystem" and "driver" only once 2008-10-15 18:34:14 +02:00
Kay Sievers
bd85566c16 libudev: update DEVLINKS property when properties are read 2008-10-15 16:56:06 +02:00
Kay Sievers
1e61ff54f5 libudev: monitor - do not mangle DEVLINKS property 2008-10-15 16:55:04 +02:00
Kay Sievers
6ebc7a4f93 libudev: do not include ctrl in libudev.so 2008-10-15 16:54:06 +02:00
Kay Sievers
979ff016ef libudev: device - add get_envp() to construct envp from property list 2008-10-15 14:21:33 +02:00
Kay Sievers
81d9e22120 libudev: monitor - fix send_device() property copying 2008-10-15 14:20:27 +02:00
Kay Sievers
517814e7d0 libudev: handle ! in sysname, add sysnum, return allocated list_entry on add 2008-10-14 19:53:47 +02:00
Kay Sievers
9a997ecf4e libudev: device - generate DEVNAME and DEVLINKS properties 2008-10-11 18:40:33 +02:00
Kay Sievers
df1dcc09ef libudev: list - add flag 2008-10-11 18:40:04 +02:00
Kay Sievers
9925ab0451 libudev: add udev_monitor_send_device() 2008-10-09 23:38:30 +02:00
Kay Sievers
8cd2e972e5 libudev: also prefix non-exported functions with udev_* 2008-10-09 22:24:43 +02:00
Kay Sievers
90d80c2efc libudev: device - add device lookup by subsystem:sysname 2008-10-07 20:20:34 +02:00
Kay Sievers
31441f6a4b libudev: fix typo in "multiple entries in symlink" handling 2008-10-06 18:17:27 +02:00
Kay Sievers
1e75cda345 store node name and symlinks into db symlink target if they are small enough 2008-10-06 13:52:43 +02:00
Kay Sievers
fa03f6ae4b libudev: libudev.pc remove selinux 2008-10-06 12:18:55 +02:00
Kay Sievers
85e73aef06 libudev: fix --enable-debug 2008-10-05 16:18:21 +02:00
Kay Sievers
3ab8ebf572 volume_id: add dbg() as noop to check for compile errors 2008-10-03 14:50:57 +02:00
Kay Sievers
ee137da389 udevadm: info - fix --query=all for devices without a device node 2008-10-03 10:33:15 +02:00
Kay Sievers
98f10a9e2a libudev: device - add get_parent_with_subsystem() 2008-10-02 21:19:00 +02:00
Kay Sievers
e598c5738c libudev: get rid of selinux
"Hello world!" linked against libselinux parses /proc/mounts and
whatever else on startup, even when the lib is not needed at all.
Not funny! Get rid of that thing where it's not absolutely needed.
2008-10-02 18:48:40 +02:00
Kay Sievers
033e9f8cde use no_argument, required_argument, optional_argument in longopts 2008-10-02 16:49:05 +02:00
Kay Sievers
13ddea8154 libudev: enumerate - add_device() -> add_syspath() 2008-10-02 11:54:33 +02:00
Kay Sievers
d6b148cde2 fix compile error with --disable-logging 2008-10-02 06:20:33 +02:00
Kay Sievers
cabfd8d0b4 libudev: enumerate - ignore regular files while scanning 2008-10-01 13:57:39 +02:00