summaryrefslogtreecommitdiffstats
path: root/discover/udev.h
Commit message (Collapse)AuthorAgeFilesLines
* discover: add reinit pathJeremy Kerr2014-04-021-0/+2
| | | | | | | | | | | | | 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>
* discover: move device sources to the device handlerJeremy Kerr2014-04-021-3/+2
| | | | | | | | | | | | | | | | | | | | 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>
* discover: Remove empty routine udev_triggerGeoff Levand2013-05-031-1/+0
| | | | | | | | 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>
* discover: Rename struct udev to struct pb_udevGeoff Levand2013-05-031-4/+5
| | | | | | | To avoid symbol clashes with libudev, rename struct udev to struct pb_udev. No functional changes. Signed-off-by: Geoff Levand <geoff@infradead.org>
* waiter: Don't rely on global variables to keep waiter stateJeremy Kerr2013-04-101-1/+2
| | | | | | | | | 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>
* Make udev_event a generic eventGeoff Levand2009-06-301-18/+0
| | | | | | | | | | 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 udev triggerGeoff Levand2009-06-301-0/+1
| | | | | | | | 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>
* Initial device handler codeJeremy Kerr2008-12-161-0/+1
| | | | | | Mount discovered devices, and set up symlinks for UUID and LABELs Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Hook up udev events to device handlerJeremy Kerr2008-12-151-1/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Initial support for multiple UIsJeremy Kerr2008-12-151-0/+26
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>
OpenPOWER on IntegriCloud