diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-04-16 15:57:43 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-04-29 14:31:20 +1000 |
commit | 4e8b779626da98e2896efbb2df99b64f76e878f6 (patch) | |
tree | c67099ac88ec5d4ecf97a3307488c199181d7b2f | |
parent | c6a36fdf2fc2e7a1c2bc4c8d16f2a3bb575b5a2f (diff) | |
download | petitboot-4e8b779626da98e2896efbb2df99b64f76e878f6.zip petitboot-4e8b779626da98e2896efbb2df99b64f76e878f6.tar.gz |
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>
-rw-r--r-- | discover/resource.c | 11 | ||||
-rw-r--r-- | discover/resource.h | 2 |
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); |