diff options
-rw-r--r-- | discover/device-handler.c | 3 | ||||
-rw-r--r-- | lib/types/types.h | 1 | ||||
-rw-r--r-- | ui/test/discover-test.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c index a271390..b083af4 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -372,7 +372,8 @@ static int default_timeout(void *arg) static bool priority_match(struct boot_priority *prio, struct discover_boot_option *opt) { - return prio->type == opt->device->device->type; + return prio->type == opt->device->device->type || + prio->type == DEVICE_TYPE_ANY; } static int default_option_priority(struct discover_boot_option *opt) diff --git a/lib/types/types.h b/lib/types/types.h index a1065ee..1293193 100644 --- a/lib/types/types.h +++ b/lib/types/types.h @@ -9,6 +9,7 @@ enum device_type { DEVICE_TYPE_NETWORK, DEVICE_TYPE_DISK, DEVICE_TYPE_OPTICAL, + DEVICE_TYPE_ANY, DEVICE_TYPE_UNKNOWN, }; diff --git a/ui/test/discover-test.c b/ui/test/discover-test.c index 576f293..363a289 100644 --- a/ui/test/discover-test.c +++ b/ui/test/discover-test.c @@ -12,6 +12,8 @@ static const char *device_type_string(enum device_type type) return "network"; case DEVICE_TYPE_OPTICAL: return "optical"; + case DEVICE_TYPE_ANY: + return "any"; case DEVICE_TYPE_UNKNOWN: return "unknown"; } |