discover: Add URL resources
authorJeremy Kerr <jk@ozlabs.org>
Tue, 16 Apr 2013 07:57:43 +0000 (15:57 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 29 Apr 2013 04:31:20 +0000 (14:31 +1000)
URL resources are simple: the URLs are already resolved, so not much to
do here.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/resource.c
discover/resource.h

index 917a6dcbf4f8fdbedff2e544d648978d1ea6b353..964c1a4d40f78b68ff922980a86c930e699cc3db 100644 (file)
@@ -111,3 +111,14 @@ bool resolve_devpath_resource(struct device_handler *handler,
 
        return true;
 }
 
        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;
+}
index 2debe3cd24970e5c429c3fed950d1f40ca018deb..1bbf8ba99b84427063ec07b92aa070119955aa1b 100644 (file)
@@ -38,6 +38,8 @@ struct resource *create_devpath_resource(void *ctx,
                struct discover_device *orig_device,
                const char *devpath);
 
                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);
 
 bool resolve_devpath_resource(struct device_handler *dev,
                struct resource *res);