]> git.ozlabs.org Git - petitboot/commit
discover: Change parsers to emit resources rather than filenames
authorJeremy Kerr <jk@ozlabs.org>
Tue, 16 Apr 2013 08:58:18 +0000 (16:58 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 29 Apr 2013 04:41:04 +0000 (14:41 +1000)
commit5be946cda7b8e2271ade6188ca3f5dc068826619
treea62a64792bb61aa57c5d8dac36c7df9756d01ef8
parent4e8b779626da98e2896efbb2df99b64f76e878f6
discover: Change parsers to emit resources rather than filenames

This change switches the parsers over to populate the resources in
discover_boot_option, rather than the string parameters in boot_option.

To do this, we need a few things:

 * Add struct resources to discover_boot_option for the boot_image,
   initrd and icon data.

 * Have the parsers populate the resources, rather than the strings.
   Currently, parsers can all use the devpath resource type.

 * Add a resolve_resource callback to parsers; this is how the device
   handler will attempt to resolve resources.

 * Change load_file to load_url, as we should be only accessing
   (resolved) resources by URLs.

This then allows us to remove the mount map, and associated lookup code,
as well as the UUID and label links to devices.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
13 files changed:
discover/Makefile.am
discover/boot.c
discover/boot.h
discover/device-handler.c
discover/device-handler.h
discover/grub2-parser.c
discover/kboot-parser.c
discover/parser.c
discover/parser.h
discover/paths.c
discover/paths.h
discover/yaboot-parser.c
test/parser/parser-test.c