X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ui%2Fcommon%2Fdiscover-client.c;h=c3f3f383f59fa0bf51f4d72ecf45482259a148db;hb=e492b596187d283cfbd65a098fe1b2d0dafa311e;hp=a40bfdafe0ce669b1d832f5d95d90f50267eadc8;hpb=e793a9b5a07a677c1d9d33f4757b67c25dbf2eed;p=petitboot diff --git a/ui/common/discover-client.c b/ui/common/discover-client.c index a40bfda..c3f3f38 100644 --- a/ui/common/discover-client.c +++ b/ui/common/discover-client.c @@ -215,8 +215,8 @@ struct discover_client* discover_client_init(struct waitset *waitset, goto out_err; } - waiter_register(waitset, client->fd, WAIT_IN, discover_client_process, - client); + waiter_register_io(waitset, client->fd, WAIT_IN, + discover_client_process, client); return client; @@ -249,6 +249,7 @@ static void create_boot_command(struct boot_command *command, command->option_id = boot_option->id; command->boot_image_file = data->image; command->initrd_file = data->initrd; + command->dtb_file = data->dtb; command->boot_args = data->args; } @@ -278,3 +279,16 @@ int discover_client_boot(struct discover_client *client, return rc; } + +int discover_client_cancel_default(struct discover_client *client) +{ + struct pb_protocol_message *message; + + message = pb_protocol_create_message(client, + PB_PROTOCOL_ACTION_CANCEL_DEFAULT, 0); + + if (!message) + return -1; + + return pb_protocol_write_message(client->fd, message); +}