From 1b50985db4e85030de3567792aedc13aa26e0fea Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Mon, 13 May 2013 09:16:00 +0800 Subject: 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 --- discover/kboot-parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'discover/kboot-parser.c') diff --git a/discover/kboot-parser.c b/discover/kboot-parser.c index 4064a3e..4b4c2f7 100644 --- a/discover/kboot-parser.c +++ b/discover/kboot-parser.c @@ -84,7 +84,7 @@ static void kboot_process_pair(struct conf_context *conf, const char *name, } out_add: - d_opt->boot_image = create_devpath_resource(opt, + d_opt->boot_image = create_devpath_resource(d_opt, conf->dc->device, value); if (root) { @@ -94,7 +94,7 @@ out_add: opt->boot_args = args; if (initrd) { - d_opt->initrd = create_devpath_resource(opt, + d_opt->initrd = create_devpath_resource(d_opt, conf->dc->device, initrd); opt->description = talloc_asprintf(opt, "%s initrd=%s %s", -- cgit v1.2.1