+static struct resource *user_event_resource(struct discover_boot_option *opt,
+ struct event *event, const char *param_name)
+{
+ struct resource *res;
+ struct pb_url *url;
+ const char *val;
+
+ val = event_get_param(event, param_name);
+ if (!val)
+ return NULL;
+
+ url = pb_url_parse(opt, val);
+ if (!url)
+ return NULL;
+
+ res = create_url_resource(opt, url);
+ if (!res) {
+ talloc_free(url);
+ return NULL;
+ }
+
+ return res;
+}
+