]> git.ozlabs.org Git - petitboot/blobdiff - ui/twin/main-generic.c
protocol: Separate device add from boot-option add messages
[petitboot] / ui / twin / main-generic.c
index 1e665b38384a9c874ce8a86298f287c54f6ff530..c9cb4923863c06b96807514e1ab46eb709ae406d 100644 (file)
@@ -199,23 +199,10 @@ fail_menu:
        return NULL;
 }
 
-static int kexec_cb(struct pbt_client *client, struct pb_opt_data *opt_data)
-{
-       int result;
-
-       assert(opt_data);
-
-       pb_log("%s: %s\n", __func__, opt_data->name);
-
-       result = pb_run_kexec(opt_data->kd, client->dry_run);
-
-       return result;
-}
-
 static int run(struct pbt_client *client)
 {
        while (1) {
-               int result = waiter_poll();
+               int result = waiter_poll(client->waitset);
 
                if (result < 0 && errno != EINTR) {
                        pb_log("%s: poll: %s\n", __func__, strerror(errno));
@@ -330,8 +317,7 @@ int main(int argc, char *argv[])
                return EXIT_FAILURE;
        }
 
-       client = pbt_client_init(opts.backend, 900, 300, kexec_cb,
-               opts.start_daemon, opts.dry_run);
+       client = pbt_client_init(opts.backend, 1024, 640, opts.start_daemon);
 
        if (!client) {
                ui_result = EXIT_FAILURE;