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

44 Commits

Author SHA1 Message Date
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
19d7e87cc0 libudev: monitor - export filter_update() 2009-04-23 18:05:10 +02:00
Kay Sievers
08a7a795f6 libudev: monitor - add udev_monitor_filter_remove 2009-04-23 04:07:51 +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
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
ff109b8ded libudev: monitor - clarify socket handling documentation 2009-04-16 01:49:16 +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
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
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
Marcel Holtmann
bf8b2ae177 libudev: device - add devtype support 2009-01-02 04:37:04 +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
c265440279 libudev: monitor - cache result of monitor send buffer 2008-10-24 16:36:27 +02:00
Kay Sievers
3c67f7d2df libudev: monitor - replace far too expensive snprintf() with strlcpy() 2008-10-24 15:09:43 +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
cb25a9585d libudev: monitor - add set_receive_buffer_size() 2008-10-17 16:49:27 +02:00
Kay Sievers
3361a0f110 libudev: monitor - export MAJOR/MINOR only if available 2008-10-16 18:56:19 +02:00
Kay Sievers
31f4b036ea libudev: device - export properties when values are set 2008-10-16 11:37:22 +02:00
Kay Sievers
1e61ff54f5 libudev: monitor - do not mangle DEVLINKS property 2008-10-15 16:55:04 +02:00
Kay Sievers
81d9e22120 libudev: monitor - fix send_device() property copying 2008-10-15 14:20:27 +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
e0083e8e69 libudev: device_init() -> device_new() 2008-09-30 16:16:29 +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
9921484458 libudev: device - read database only when needed 2008-09-26 19:43:32 +02:00
Kay Sievers
38f27948cd always include config.h from Makefile 2008-09-19 23:03:49 -07:00
Kay Sievers
8753fadf2a libudev: switch API from devpath to syspath 2008-09-15 17:12:47 -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
3eb46ec6dd libudev: do not use any udev source file 2008-09-10 18:00:31 +02:00
Kay Sievers
1c7047ea77 libudev: monitor- add netlink uevent support 2008-09-09 17:38:10 +02:00
Kay Sievers
37372bbc38 libudev: monitor - add event properties to udev_device 2008-09-09 14:37:36 +02:00
Kay Sievers
c4f5f942d7 add a bunch of private device properties to udev_device 2008-09-09 14:06:20 +02:00
Kay Sievers
d59f11e140 move udev_ctrl to libudev-private 2008-09-08 17:59:00 +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
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
7d8787b311 libudev: add monitor documentation 2008-08-30 16:16:37 +02:00
Kay Sievers
ba6929f669 libudev: add udev event monitor API 2008-08-28 23:05:01 +02:00