Kay Sievers
096e59edc9
limit $attr(<symlink>) magic to well-known links only
2008-11-17 02:01:37 +01:00
Kay Sievers
f454ecf754
libudev: device - handle disk "device" link for partitions in deprecated sysfs layout
...
Thanks to Mikhail Kolesnik <mike@openbunker.org> for finding this.
2008-11-14 18:26:49 +01:00
Kay Sievers
77b852f333
do not import the "uevent" file when we only read the db to get old symlinks
2008-11-05 12:23:06 +01:00
Kay Sievers
6e0cb78c9d
fix cleanup of possible left-over symlinks
2008-11-05 04:45:23 +01:00
Kay Sievers
1e78dcbe51
fix list handling in enumerate and rules file sorting
2008-11-04 20:19:01 +01:00
Kay Sievers
86b5778857
move some info() to dbg()
2008-11-01 20:16:24 +01:00
Alan Jenkins
be7de4097a
kerneldoc comment fixes
...
s/ressources/resources/
Also reduce commas per sentence and add a possessive apostrophe.
2008-10-26 15:55:47 +01:00
Kay Sievers
427e20b261
libudev: device - allocate envp array only once
2008-10-26 14:31:46 +01:00
Kay Sievers
c6243a414e
test: add RUN+="socket: ..." to a test to run monitor code
2008-10-26 04:35:32 +01:00
Kay Sievers
6493e655f7
libudev: device - fill envp array while composing monitor buffer
...
Thanks to Alan Jenkins, for the idea.
2008-10-26 03:39:41 +01:00
Kay Sievers
b62557daff
remove debug printf
2008-10-24 18:09:13 +02:00
Kay Sievers
c265440279
libudev: monitor - cache result of monitor send buffer
2008-10-24 16:36:27 +02:00
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
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
eb8837e15c
udev_list_cleanup() -> udev_list_cleanup_entries()
2008-10-18 19:27:38 +02:00
Alan Jenkins
babcf3cb22
libudev: fix sysnum logic for digit-only device names
2008-10-17 13:19:54 +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
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
979ff016ef
libudev: device - add get_envp() to construct envp from property list
2008-10-15 14:21:33 +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
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
98f10a9e2a
libudev: device - add get_parent_with_subsystem()
2008-10-02 21:19:00 +02:00
Kay Sievers
62b9dfb622
libudev: device - handle /sys/block/<disk-device-link>/<partition>
2008-10-01 10:22:47 +02:00
Kay Sievers
e0083e8e69
libudev: device_init() -> device_new()
2008-09-30 16:16:29 +02:00
Kay Sievers
c97f839eed
libudev: enumerate - scan devices and subsystems, add subsystem and attribute filter
2008-09-30 13:42:26 +02:00
Alan Jenkins
659353f5a9
replace strerror() usage with threadsafe "%m" format string
...
strerror() is not threadsafe. It uses a buffer to build messages of the form
"Unknown error 387689".
syslog() provides a %m format which is equivalent to strerror(errno).
As a GNU extension, this is also accepted by printf and friends.
At least in the current implementation, it is correctly threadsafe.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-09-29 17:06:00 +02:00
Kay Sievers
438d4c3cd4
libudev: enumerate - split new() and scan()
2008-09-29 02:00:17 +02:00
Kay Sievers
bc8184ede9
libudev: enumerate - accept list of subsystems to scan, or skip
2008-09-28 17:39:31 +02:00
Kay Sievers
b95f8a76e6
lubudev: accept more sys directories as devices, and parent devices
2008-09-28 03:34:57 +02:00
Kay Sievers
0de33a61d7
libudev: more list rework
2008-09-28 01:34:55 +02:00
Kay Sievers
e345e2670a
libudev: rework list handling
2008-09-26 19:44:53 +02:00
Kay Sievers
9921484458
libudev: device - read database only when needed
2008-09-26 19:43:32 +02:00
Kay Sievers
cd42b50d86
libudev: enumerate_get_devices_list -> enumerate_get_list
2008-09-26 19:41:50 +02:00
Kay Sievers
04f5d75f0c
libudev: get devnum from uevent file
2008-09-25 14:26:22 -07:00
Kay Sievers
bf7ad0ea66
libudev: replace awkward callback list interfaces with list iterators
2008-09-25 04:20:27 -07:00
Kay Sievers
03198b9303
libudev: also import "uevent" file when reading udev database
2008-09-24 12:25:31 -07:00
Kay Sievers
4c9dff47f6
libudev: add udev_device_new_from_devnum()
2008-09-21 23:28:56 -07:00
Kay Sievers
fb762bb928
libudev: udev_device_get_devname -> udev_device_get_devnode
2008-09-20 00:01:20 -07:00