| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, changes to settings doesn't take effect while the discover
server is running. This means we need to reboot for any changes (eg, to
network settings) to take effect.
This change introduces a reinit path. Triggered by a configuration
update, this will cause the device handler to drop all of its devices
(and boot options), and restart the discovery process from the device
sources.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the pb-discover main() function initialises the device
handler and the device sources.
We want to eventually be able to re-init the device sources, which will
be initiated by the handler. In this case, the handler will need
references to the sources.
This change moves the creation of the device sources to be internal to
the handler. This way, the device handler gets a reference to
everything, without having to pass pointers around in main().
We also remove the _destroy functions, as we handle everything through
talloc destructors, as all sources are parented to the handler. We also
change user_event_init and udev_init to take the handler as the first
('context') argument, to make them consistent with network_init.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
With the switch of the discover server to use the libudev
enumeration support the udev_trigger() routine has becone
empty and is no longer needed.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
| |
To avoid symbol clashes with libudev, rename struct udev to
struct pb_udev. No functional changes.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
|
|
| |
Rather than defining the set of waiters (and pollfds) in waiter.c, add a
struct waitset to contain these. A waitset is created with
waitset_create, which is passed to the waiter_* functions.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
|
|
|
| |
The struct udev_event can be used as a generic event, so rename it
struct event and move it from udev.h into a new file event.h.
Also, rename the emums UDEV_ACTION_ADD and UDEV_ACTION_REMOVE
to ACTION_UDEV_ADD and ACTION_UDEV_REMOVE.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add a new routine udev_trigger() that requests a replay of
system udev events.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Mount discovered devices, and set up symlinks for UUID and LABELs
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
Move the device discovery code from separate udev helpers to a single
process to listen on two sockets: one SOCK_DGRAM for incoming udev
events, and one SOCK_STREAM for UIs to connect.
Initial support for client/server infrastructure, still need to wire-up
the udev messages.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|