summaryrefslogtreecommitdiffstats
path: root/discover
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-04-16 15:57:43 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-04-29 14:31:20 +1000
commit4e8b779626da98e2896efbb2df99b64f76e878f6 (patch)
treec67099ac88ec5d4ecf97a3307488c199181d7b2f /discover
parentc6a36fdf2fc2e7a1c2bc4c8d16f2a3bb575b5a2f (diff)
downloadtalos-petitboot-4e8b779626da98e2896efbb2df99b64f76e878f6.tar.gz
talos-petitboot-4e8b779626da98e2896efbb2df99b64f76e878f6.zip
discover: Add URL resources
URL resources are simple: the URLs are already resolved, so not much to do here. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover')
-rw-r--r--discover/resource.c11
-rw-r--r--discover/resource.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/discover/resource.c b/discover/resource.c
index 917a6dc..964c1a4 100644
--- a/discover/resource.c
+++ b/discover/resource.c
@@ -111,3 +111,14 @@ bool resolve_devpath_resource(struct device_handler *handler,
return true;
}
+
+struct resource *create_url_resource(void *ctx, struct pb_url *url)
+{
+ struct resource *res;
+
+ res = talloc(ctx, struct resource);
+ res->url = url;
+ res->resolved = true;
+
+ return res;
+}
diff --git a/discover/resource.h b/discover/resource.h
index 2debe3c..1bbf8ba 100644
--- a/discover/resource.h
+++ b/discover/resource.h
@@ -38,6 +38,8 @@ struct resource *create_devpath_resource(void *ctx,
struct discover_device *orig_device,
const char *devpath);
+struct resource *create_url_resource(void *ctx, struct pb_url *url);
+
bool resolve_devpath_resource(struct device_handler *dev,
struct resource *res);
OpenPOWER on IntegriCloud