summaryrefslogtreecommitdiffstats
path: root/discover/resource.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-05-13 09:16:00 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-05-15 14:38:04 +0800
commit1b50985db4e85030de3567792aedc13aa26e0fea (patch)
tree48cca47b21140712ca20b5eaff2c4b041fb6ac48 /discover/resource.h
parent07bf13167aacf49a694aea3341caa15379916bec (diff)
downloadtalos-petitboot-1b50985db4e85030de3567792aedc13aa26e0fea.tar.gz
talos-petitboot-1b50985db4e85030de3567792aedc13aa26e0fea.zip
discover: Always associate resources with a boot option
We should always be tallocing resources to a boot option context; anything else (for example, the discover context) may have a different lifetime. In order to enforce this, we change the void *ctx argument to the context_create functions to a struct discover_boot_option. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/resource.h')
-rw-r--r--discover/resource.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/discover/resource.h b/discover/resource.h
index 7794ee5..3ef13a5 100644
--- a/discover/resource.h
+++ b/discover/resource.h
@@ -3,6 +3,7 @@
#include <stdbool.h>
+struct discover_boot_option;
struct discover_device;
struct device_handler;
struct pb_url;
@@ -36,11 +37,12 @@ struct resource {
* callback.
*/
-struct resource *create_devpath_resource(void *ctx,
+struct resource *create_devpath_resource(struct discover_boot_option *opt,
struct discover_device *orig_device,
const char *devpath);
-struct resource *create_url_resource(void *ctx, struct pb_url *url);
+struct resource *create_url_resource(struct discover_boot_option *opt,
+ struct pb_url *url);
bool resolve_devpath_resource(struct device_handler *dev,
struct resource *res);
OpenPOWER on IntegriCloud