summaryrefslogtreecommitdiffstats
path: root/discover/device-handler.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-09-05 14:18:18 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-09-08 13:43:24 +1000
commite2c92865481a5fb043c03c0cde625a96ca608699 (patch)
tree6ff1b4f3a2ca32ccfb7969fff77f252468220b0d /discover/device-handler.c
parenta50d5fe279db71cf85fabeb675c99b167ec63dcb (diff)
downloadtalos-petitboot-e2c92865481a5fb043c03c0cde625a96ca608699.zip
talos-petitboot-e2c92865481a5fb043c03c0cde625a96ca608699.tar.gz
discover: Deprecate 'conf' user event
The 'conf' user event is functionally very similar to the 'url' event, in that both events result in downloading a specified configuration file and passing it to iterate_parsers(). The 'url' event additionally allows downloading files from a directory path and is also accessed by the UI via pb-protocol, so remove the 'conf' event and associated functions in favour of 'url' and device_handler_process_url(). Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/device-handler.c')
-rw-r--r--discover/device-handler.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index 346cb02..54a1986 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -921,36 +921,6 @@ int device_handler_dhcp(struct device_handler *handler,
return 0;
}
-/* incoming conf event */
-int device_handler_conf(struct device_handler *handler,
- struct discover_device *dev, struct pb_url *url)
-{
- struct discover_context *ctx;
- struct boot_status *status;
-
- status = talloc_zero(handler, struct boot_status);
- status->type = BOOT_STATUS_INFO;
- status->message = talloc_asprintf(status, _("Processing user config"));
- device_handler_boot_status(handler, status);
-
- /* create our context */
- ctx = device_handler_discover_context_create(handler, dev);
- ctx->conf_url = url;
-
- iterate_parsers(ctx);
-
- device_handler_discover_context_commit(handler, ctx);
-
- status->message = talloc_asprintf(status,
- _("Processing user config complete"));
- device_handler_boot_status(handler, status);
-
- talloc_free(status);
- talloc_unlink(handler, ctx);
-
- return 0;
-}
-
static struct discover_boot_option *find_boot_option_by_id(
struct device_handler *handler, const char *id)
{
@@ -1127,7 +1097,7 @@ void device_handler_process_url(struct device_handler *handler,
event = talloc(handler, struct event);
event->type = EVENT_TYPE_USER;
- event->action = EVENT_ACTION_CONF;
+ event->action = EVENT_ACTION_URL;
if (url[strlen(url) - 1] == '/') {
event->params = talloc_array(event, struct param, 3);
OpenPOWER on IntegriCloud