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
ee173c5927
replace spaces in dm and md name symlinks
...
We create multiple symlinks for dm names with spaces, which
isn't what we want.
2008-10-07 00:41:00 +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
ff6c1cb139
don not print error if GOTO jumps just to next rule
2008-10-05 17:27:21 +02:00
Kay Sievers
85e73aef06
libudev: fix --enable-debug
2008-10-05 16:18:21 +02:00
Kay Sievers
30f8f89625
udevd: clarify deprecated sysfs layout warning
2008-10-04 13:52:39 +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
7744e869ec
move selinux noops to udev.h
2008-10-03 14:49:29 +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
f13e4c36c2
udevd: print warning if CONFIG_SYSFS_DEPRECATED is used
...
Future udev versions will depend on the current sysfs layout, which
includes features which are not available in the deprecated mode.
2008-10-01 19:00:55 +02:00
Kay Sievers
8a1946ae08
udevadm: trigger --type=failed - use libudev queue
2008-10-01 14:41:43 +02:00
Kay Sievers
cabfd8d0b4
libudev: enumerate - ignore regular files while scanning
2008-10-01 13:57:39 +02:00
Kay Sievers
62b9dfb622
libudev: device - handle /sys/block/<disk-device-link>/<partition>
2008-10-01 10:22:47 +02:00
Kay Sievers
8249e04e3e
udevadm: settle - use libudev queue
2008-10-01 09:42:03 +02:00
Kay Sievers
64ccdf8269
libudev: add queue interface
2008-10-01 09:34:07 +02:00
Kay Sievers
d41b956e7f
udevadm: trigger fix long option --type=
2008-09-30 16:25:46 +02:00
Kay Sievers
e0083e8e69
libudev: device_init() -> device_new()
2008-09-30 16:16:29 +02:00
Kay Sievers
d98bffa802
fix segfault caused by wrong pointer used in dbg()
2008-09-30 14:47:49 +02:00
Kay Sievers
f5001d2465
udevadm: trigger: use libudev
2008-09-30 13:43:35 +02:00
Kay Sievers
c97f839eed
libudev: enumerate - scan devices and subsystems, add subsystem and attribute filter
2008-09-30 13:42:26 +02:00
Kay Sievers
4aa0b15efb
fix dbg() callers
2008-09-29 19:03:08 +02:00
Alan Jenkins
9176ac1f4e
allow compiler to check dbg() arguments on non-debug builds
...
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-09-29 18:54:21 +02:00
Alan Jenkins
120ff8a0e8
fix messages (inc. debug compile failure) introduced when optimizing "goto"
...
Signed-off-by: <alan-jenkins@tuffmail.co.uk>
2008-09-29 18:39:41 +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
d0f398bc25
gitignore: move *.8 to subdirs
2008-09-29 05:03:43 +02:00
Kay Sievers
438d4c3cd4
libudev: enumerate - split new() and scan()
2008-09-29 02:00:17 +02:00
Kay Sievers
b03e89cfba
libudev: enumerate - scan /sys/block/ if needed
2008-09-28 23:17:29 +02:00
Kay Sievers
6f67f1dfb7
libudev: enumerate "subsystem"
2008-09-28 22:18:40 +02:00
Kay Sievers
bc8184ede9
libudev: enumerate - accept list of subsystems to scan, or skip
2008-09-28 17:39:31 +02:00
Alan Jenkins
41b7a00922
avoid repeated scans for goto targets (udev_iter_find_label)
...
The scans are now performed up-front at parse-time, instead of being
repeated for each event at run-time.
Cachegrind reports a 5% reduction in cpu cycles
(excluding the time spent in-kernel).
2008-09-28 14:11:47 +02:00
Alan Jenkins
669ed8675f
trivial cleanup in udev_rules_iter
2008-09-28 14:10:53 +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
5fc523db68
libudev: initialize selinux only when needed
2008-09-26 19:43:14 +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
c8e32461cc
libudev: add userdata pointer
2008-09-24 21:39:29 -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
Kay Sievers
38f27948cd
always include config.h from Makefile
2008-09-19 23:03:49 -07:00
Kay Sievers
279595bd1a
libudev: fix "subsystem" value
2008-09-17 23:58:38 -07:00
Kay Sievers
a076080bd4
libudev: pass udev_device in enumerate
2008-09-17 23:32:43 -07:00
Kay Sievers
7bcbf7ecc8
fix udevadm trigger
2008-09-16 16:32:42 -07:00
Kay Sievers
44589a0c73
fix broken symlink resolving
2008-09-16 09:53:36 -07:00
Kay Sievers
c68a293678
vol_id: fix lib logging glue
2008-09-16 00:40:47 -07:00
Kay Sievers
7b3a52f499
libudev: rename ctrl_msg to ctrl_msg_wire
2008-09-15 18:01:15 -07:00
Kay Sievers
8753fadf2a
libudev: switch API from devpath to syspath
2008-09-15 17:12:47 -07:00
Kay Sievers
9a8047fa29
udevadm: info - fix lookup-by-name
2008-09-15 12:01:35 -07:00
Kay Sievers
0518da3b74
libudev: handle "device" link as parent, handle "class" "block" as "subsystem"
2008-09-15 11:19:56 -07:00
Kay Sievers
93b0f38458
libudev: udev_device - add attribute cache
2008-09-13 21:09:28 +02:00
Kay Sievers
b2d9e4f200
libudev: switch to "udev_device_get_parent"
2008-09-12 00:58:40 +02:00
Kay Sievers
4ad3a37f50
udevadm: info - use "udev_device"
2008-09-11 17:08:12 +02:00
Kay Sievers
17fcfb5972
use size definitions from libudev
2008-09-10 21:50:21 +02:00
Kay Sievers
31c1f53745
get rid of udev_sysdeps.c
2008-09-10 18:59:42 +02:00
Kay Sievers
ecc9ec579f
convert to libudev and delete udev_utils_string.c
2008-09-10 18:39:23 +02:00
Kay Sievers
7525097713
extras: use libudev code
2008-09-10 18:24:39 +02:00
Kay Sievers
3eb46ec6dd
libudev: do not use any udev source file
2008-09-10 18:00:31 +02:00
Kay Sievers
b2946df419
libudev: rename libudev-utils.c libudev-util.c
2008-09-10 17:12:33 +02:00
Kay Sievers
7a01f11afb
libudev: get rid of udev_utils.c
2008-09-10 17:08:24 +02:00
Kay Sievers
b21b95d722
libudev: get rid of udev_sysfs.c
2008-09-10 14:29:07 +02:00
Kay Sievers
e88a82b597
libudev: do not use udev_db.c
2008-09-10 14:17:36 +02:00
Kay Sievers
6bd1c78a8a
libudev: udev_device - add more properties
2008-09-10 10:09:34 +02:00
Kay Sievers
55e9959b15
update file headers
2008-09-10 02:40:42 +02:00
Kay Sievers
3fd0648c60
libudev: initialize selinux after logging
2008-09-10 01:47:51 +02:00
Kay Sievers
4f4b12c203
libudev: add selinux
2008-09-10 00:46:17 +02:00
Kay Sievers
6b12bdb624
libudev: rename enumerate function
2008-09-09 22:10:33 +02:00
Kay Sievers
95d90c4fe0
libudev: udev_device - read "driver" value
2008-09-09 18:14:54 +02:00
Kay Sievers
9b3a33a9ff
udevadm: monitor - use libudev code to retrieve device data
2008-09-09 17:41:17 +02:00
Kay Sievers
1c7047ea77
libudev: monitor- add netlink uevent support
2008-09-09 17:38:10 +02:00
Kay Sievers
3bc7c84cf0
udevd: remove max_childs_running logic
...
This was needed in the old days, where all the hotplug scripts did
nothing better than sleep for seconds to work around timing issues.
It made sure, that w continued to fork processes, while the machine
was doing nothing than sleeping, but the maximim number of childs
was already reached. This is no longer needed today, we do not run
many of these scripts anymore.
2008-09-09 15:14:38 +02:00
Kay Sievers
bd770e0183
udevadm: log message if udevadm link is used
2008-09-09 14:48:42 +02:00
Kay Sievers
37372bbc38
libudev: monitor - add event properties to udev_device
2008-09-09 14:37:36 +02:00
Kay Sievers
8a4c287d15
udevadm: monitor - use libudev for udev monitor
2008-09-09 14:07:08 +02:00
Kay Sievers
c4f5f942d7
add a bunch of private device properties to udev_device
2008-09-09 14:06:20 +02:00
Alan Jenkins
9d7e1b3fdd
fix off-by-one in pass_env_to_socket()
2008-09-09 00:48:17 +02:00
Kay Sievers
ab7ab02556
test-udev: remove unused var
2008-09-09 00:47:48 +02:00
Alan Jenkins
df7ae680d8
threadsafe rules iteration
...
Move ->current out of "struct udev_rules" and into a new "struct udev_rules_iter".
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-09-09 00:09:49 +02:00
Kay Sievers
a035bf2744
test-udev: cleanup libudev context and overridden rules file string
2008-09-09 00:08:42 +02:00
Alan Jenkins
2dccc8b054
remove redundant "remove trailing newlines" in udevadm info
2008-09-08 22:02:07 +02:00
Alan Jenkins
3b738db6eb
remove redundant string copy in udev_rules_apply_format()
2008-09-08 21:59:27 +02:00
Alan Jenkins
cb8896cd74
fix name compare bug name_list_key_add()
...
The search for an existing key e.g. FOO would match longer
keys e.g. FOOBAR. Reuse the correct code from name_list_remove().
2008-09-08 21:51:30 +02:00
Kay Sievers
d59f11e140
move udev_ctrl to libudev-private
2008-09-08 17:59:00 +02:00
Kay Sievers
e5931bb7d8
udevadm: add --version --help options to man page, hide them as commands
2008-09-07 14:48:33 +02:00
Kay Sievers
7d563a17f3
use libudev code, unify logging, pass udev context around everywhere
2008-09-06 15:45:31 +02:00
Kay Sievers
60865f33a1
udevadm: move init from commands to udevadm
2008-09-04 10:34:48 +02:00
Kay Sievers
8a3c06af21
udevadm: split out control functions
2008-09-03 23:48:44 +02:00
Kay Sievers
32bf83996b
udevadm: rename internal functions to udevadm_*
2008-09-03 23:38:32 +02:00
Kay Sievers
e4255f1153
udevadm: rename source files
2008-09-03 23:33:06 +02:00
Kay Sievers
742f4cad0d
udevadm: print warning to stderr if udevadm is called by symlink
2008-09-03 21:59:21 +02:00
Kay Sievers
2b725651e5
udevadm: control - use getopt_long()
2008-09-03 21:56:47 +02:00
Kay Sievers
cce9d77393
udevadm: info - fix broken --device-id-of-file=
2008-09-03 19:50:36 +02:00
Alan Jenkins
593453115b
remove deprecated envp[] in main()
...
envp is not standardized, and may become invalid when environment variables
are modified. Since udev never actually uses it, we can simply remove it.
Should anyone miss it in future, they can use the standardized environ
variable - like udev_rules.c does already.
2008-09-02 23:19:36 +02:00
Kay Sievers
44aff4cd6d
udev_device_init() remove statically allocated device support
2008-09-01 20:59:09 +02:00
Alan Jenkins
0d1c29c3d1
do not needlessly declare some local variables in udev_rules_parse.c as static
2008-09-01 19:46:19 +02:00
Kay Sievers
11d543c1ee
libudev: add udev_device_get_syspath()
2008-09-01 18:52:22 +02:00
Kay Sievers
b98fd84005
libudev: fix monitor documentation
2008-09-01 16:41:41 +02:00
Kay Sievers
1893cf588f
libudev: libudev.pc add Libs.private
2008-09-01 16:38:10 +02:00
Alan Jenkins
bc1e4a138b
fix uninitialized name_list error::ignore_error
...
Running udevd under valgrind (and then udevtrigger):
==17705== Conditional jump or move depends on uninitialised value(s)
==17705== at 0x407BBB: udev_rules_run (udev_rules.c:522)
==17705== by 0x4109F0: udev_event_process (udevd.c:145)
==17705== by 0x410E2C: udev_event_run (udevd.c:251)
==17705== by 0x411A8D: msg_queue_manager (udevd.c:581)
==17705== by 0x41386B: main (udevd.c:1284)
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2008-09-01 16:36:43 +02:00
Kay Sievers
424756eda3
fix dangling pointer returned by attr_get_by_subsys_id()
...
Thanks to Alan Jenkins <alan-jenkins@tuffmail.co.uk> for
finding this.
2008-09-01 10:21:05 +02:00
Kay Sievers
e407720bba
autogen.sh: add --with-selinux
2008-08-30 23:08:19 +02:00
Kay Sievers
4cf2368510
libudev: fix --disable-log
2008-08-30 23:07:50 +02:00
Kay Sievers
7d8787b311
libudev: add monitor documentation
2008-08-30 16:16:37 +02:00
Kay Sievers
a689165b5a
libudev: require LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE
2008-08-29 21:22:24 +02:00
Kay Sievers
aa1f5304b0
libudev: link against selinux if needed
2008-08-29 20:48:25 +02:00
Kay Sievers
d46f37fdee
split udev_device.c to leave out rules handling from libudev
2008-08-29 20:32:05 +02:00
Kay Sievers
ba6929f669
libudev: add udev event monitor API
2008-08-28 23:05:01 +02:00
Kay Sievers
eb1f0e6615
libudev: split source files
2008-08-27 22:02:41 +02:00
Kay Sievers
33a5cc2976
libudev: add library to access udev information
2008-08-27 17:11:58 +02:00
Kay Sievers
d7c709c918
update .gitignore
...
Based on Karel's patch. Thanks!
2008-08-13 11:30:26 +02:00
Karel Zak
a3b55b1c47
build-sys: don't duplicate file names
...
Almost all filenames in udev/Makefile.am are duplicated in
{udevd,udevadm,test_udev}_SOURCE lists.
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-08-13 11:12:53 +02:00
Kay Sievers
b7ec267e17
add missing includes
2008-08-12 11:18:39 +02:00
Kay Sievers
8ef5af2db8
ignore duplicated rules file names
2008-08-09 14:05:01 +02:00
Kay Sievers
661c67953d
udevadm: trigger - add missing attr filter to synthesized "subsystem" register events
2008-08-08 22:39:32 +02:00
Kay Sievers
6b8c150e12
add inotify dummy definitions if inotify is not available
2008-08-08 22:36:58 +02:00
Kay Sievers
01618658fd
use autotools
2008-07-30 01:45:23 +02:00
Kay Sievers
726687ad48
delete all Makefiles and move udev source to udev/
2008-07-30 00:39:15 +02:00