Initial support for multiple UIs
[petitboot] / discover / pb-discover.c
1
2 #include <stdlib.h>
3 #include <signal.h>
4
5 #include "udev.h"
6 #include "discover-server.h"
7 #include "waiter.h"
8 #include "log.h"
9
10
11 int main(void)
12 {
13         struct discover_server *server;
14         struct udev *udev;
15
16         /* we look for closed sockets when we write, so ignore SIGPIPE */
17         signal(SIGPIPE, SIG_IGN);
18
19         udev = udev_init();
20         if (!udev)
21                 return EXIT_FAILURE;
22
23         server = discover_server_init();
24         if (!server)
25                 return EXIT_FAILURE;
26
27         for (;;) {
28                 if (waiter_poll())
29                         return EXIT_FAILURE;
30         }
31
32
33         return EXIT_SUCCESS;
34 }