X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fdiscover-server.c;h=3377fa66621fc29be47b0c4cb388342641000bfa;hp=57cf3b78975f909c41a112af1a6f1fd4704e84e4;hb=3ac4c8727c54c020014f0731549c80400476a138;hpb=37feda62bd2835eabc779d275301a9b763521f7a diff --git a/discover/discover-server.c b/discover/discover-server.c index 57cf3b7..3377fa6 100644 --- a/discover/discover-server.c +++ b/discover/discover-server.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -246,6 +247,7 @@ static int write_config_message(struct discover_server *server, static int discover_server_process_message(void *arg) { + struct autoboot_option *autoboot_opt; struct pb_protocol_message *message; struct boot_command *boot_command; struct client *client = arg; @@ -310,6 +312,21 @@ static int discover_server_process_message(void *arg) device_handler_install_plugin(client->server->device_handler, url); break; + + case PB_PROTOCOL_ACTION_TEMP_AUTOBOOT: + autoboot_opt = talloc_zero(client, struct autoboot_option); + rc = pb_protocol_deserialise_temp_autoboot(autoboot_opt, + message); + if (rc) { + pb_log("can't parse temporary autoboot message\n"); + return 0; + } + + device_handler_apply_temp_autoboot( + client->server->device_handler, + autoboot_opt); + break; + default: pb_log("%s: invalid action %d\n", __func__, message->action); return 0;