summaryrefslogtreecommitdiffstats
path: root/discover/pb-discover.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-09-19 22:04:12 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-09-19 22:07:09 +0800
commitb324b03e2b603dafddfaac607e5f98d9cd9c0f04 (patch)
treea891c13e9d4644ff36d0f32b4c46aca8bfa76bd5 /discover/pb-discover.c
parent4400b62c78526cf744d2aec3fba86911da936f7a (diff)
downloadtalos-petitboot-b324b03e2b603dafddfaac607e5f98d9cd9c0f04.tar.gz
talos-petitboot-b324b03e2b603dafddfaac607e5f98d9cd9c0f04.zip
discover: register network devices with the device handler
We'd like to correlate incoming network boot options with a device, so register the interface with the device hander. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/pb-discover.c')
-rw-r--r--discover/pb-discover.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/discover/pb-discover.c b/discover/pb-discover.c
index 26df9b3..6def090 100644
--- a/discover/pb-discover.c
+++ b/discover/pb-discover.c
@@ -173,20 +173,21 @@ int main(int argc, char *argv[])
config_init(NULL);
- network = network_init(server, waitset, opts.dry_run == opt_yes);
- if (!network)
- return EXIT_FAILURE;
-
handler = device_handler_init(server, waitset, opts.dry_run == opt_yes);
if (!handler)
return EXIT_FAILURE;
discover_server_set_device_source(server, handler);
+ /* init our device sources: udev, network and user events */
udev = udev_init(waitset, handler);
if (!udev)
return EXIT_FAILURE;
+ network = network_init(handler, waitset, opts.dry_run == opt_yes);
+ if (!network)
+ return EXIT_FAILURE;
+
uev = user_event_init(waitset, handler);
if (!uev)
return EXIT_FAILURE;
OpenPOWER on IntegriCloud