Signed-off-by: Peter Jones <pjones@redhat.com>
va_end(aq);
}
+ if (!(options & (EFIBOOT_ABBREV_FILE|EFIBOOT_ABBREV_HD)) &&
+ (dev->flags & DEV_ABBREV_ONLY)) {
+ errno = EINVAL;
+ efi_error("Device must use File() or HD() device path");
+ goto err;
+ }
+
if ((options & EFIBOOT_ABBREV_EDD10)
&& (!(options & EFIBOOT_ABBREV_FILE)
&& !(options & EFIBOOT_ABBREV_HD))) {
continue;
}
debug(DEBUG, "%s matched %s", probe->name, current);
+ dev->flags |= probe->flags;
- if (probe->flags & DEV_PROVIDES_HD || probe->flags & DEV_PROVIDES_ROOT)
+ if (probe->flags & DEV_PROVIDES_HD ||
+ probe->flags & DEV_PROVIDES_ROOT ||
+ probe->flags & DEV_ABBREV_ONLY)
needs_root = false;
dev->probes[n++] = dev_probes[i];
current += pos;
struct device {
enum interface_type interface_type;
+ uint32_t flags;
char *link;
char *device;
char *driver;
#define DEV_PROVIDES_ROOT 1
#define DEV_PROVIDES_HD 2
+#define DEV_ABBREV_ONLY 4
struct dev_probe {
char *name;