6 struct discover_boot_option;
7 struct discover_device;
12 * Data for local/remote resources. Resources may be "unresolved", in that
13 * they refer to a device that is not yet present. Unresolved resources
14 * simply contain parser-specific data (generally a device string parsed from
15 * the config file), and may be resolved by the parser once new devices appear.
25 void resolve_resource_against_device(struct resource *res,
26 struct discover_device *dev, const char *path);
31 * Most resources in config files will be in one of the following formats:
33 * - device-local filenames (ie, filenames on the currently-discovered dev)
34 * - other-device filenames (which speficy the device by a string format,
35 * using a dev:path format).
37 * The following definitions are a generic resource handler for these types
38 * of resources. By creating resources with create_devpath_resource,
39 * parsers can use resolve_devpath_resource as their resolve_resouce
43 struct resource *create_devpath_resource(struct discover_boot_option *opt,
44 struct discover_device *orig_device,
47 struct resource *create_url_resource(struct discover_boot_option *opt,
50 bool resolve_devpath_resource(struct device_handler *dev,
51 struct resource *res);
53 #endif /* RESOURCE_H */