+static int user_event_url(struct user_event *uev, struct event *event)
+{
+ struct device_handler *handler = uev->handler;
+ const char *url;
+
+ url = event_get_param(event, "url");
+ if (url)
+ device_handler_process_url(handler, url, NULL, NULL);
+
+ return 0;
+}
+
+static int user_event_boot(struct user_event *uev, struct event *event)
+{
+ struct device_handler *handler = uev->handler;
+ struct boot_command *cmd = talloc(handler, struct boot_command);
+
+ cmd->option_id = talloc_strdup(cmd, event_get_param(event, "id"));
+ cmd->boot_image_file = talloc_strdup(cmd, event_get_param(event, "image"));
+ cmd->initrd_file = talloc_strdup(cmd, event_get_param(event, "initrd"));
+ cmd->dtb_file = talloc_strdup(cmd, event_get_param(event, "dtb"));
+ cmd->boot_args = talloc_strdup(cmd, event_get_param(event, "args"));
+
+ device_handler_boot(handler, cmd);
+
+ talloc_free(cmd);
+
+ return 0;
+}
+
+static int user_event_sync(struct user_event *uev, struct event *event)
+{
+ struct device_handler *handler = uev->handler;
+
+ if (strncasecmp(event->device, "all", strlen("all")) != 0)
+ device_sync_snapshots(handler, event->device);
+ else
+ device_sync_snapshots(handler, NULL);
+
+ return 0;
+}
+