summaryrefslogtreecommitdiffstats
path: root/discover/device-handler.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-10-24 14:43:05 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-11-13 17:28:18 +0800
commit52bec18801b226b57f53d9f075addd2c07caa3db (patch)
tree73f23d4eb9a812768710a75100607739074d6527 /discover/device-handler.c
parent7832d10c59cfe7f06e19bc6f0b6acaac1a552618 (diff)
downloadtalos-petitboot-52bec18801b226b57f53d9f075addd2c07caa3db.tar.gz
talos-petitboot-52bec18801b226b57f53d9f075addd2c07caa3db.zip
discover: Handle incoming configuration messages
When the client sends us a PB_PROTOCOL_ACTION_CONFIG message, we want to update the current config. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/device-handler.c')
-rw-r--r--discover/device-handler.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index 6fa14f9..725e491 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -1,4 +1,3 @@
-
#include <assert.h>
#include <stdlib.h>
#include <stdbool.h>
@@ -717,6 +716,13 @@ void device_handler_cancel_default(struct device_handler *handler)
discover_server_notify_boot_status(handler->server, &status);
}
+void device_handler_update_config(struct device_handler *handler,
+ struct config *config)
+{
+ config_set(config);
+ discover_server_notify_config(handler->server, config);
+}
+
#ifndef PETITBOOT_TEST
static bool check_existing_mount(struct discover_device *dev)
{
OpenPOWER on IntegriCloud