diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-01-30 16:32:21 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-01-30 21:59:10 +0800 |
commit | 95a566908a5e02c51bd2af6b468df3fb9ad1bf75 (patch) | |
tree | b1152eaef4af8aa874da0e3389d03b89602453c5 /discover | |
parent | aa530148044a7c6d7ec7b6a32672cc69d53979b2 (diff) | |
download | talos-petitboot-95a566908a5e02c51bd2af6b468df3fb9ad1bf75.tar.gz talos-petitboot-95a566908a5e02c51bd2af6b468df3fb9ad1bf75.zip |
discover: Add DEVICE_TYPE_ANY for matching any device
Currently, If we want disable all but a specific device type from
default boot, we need to add a negative priority for all other devices.
This change adds a DEVICE_TYPE_ANY definition, to allow a simpler way to
express "only boot a specific type" by default behaviour.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover')
-rw-r--r-- | discover/device-handler.c | 3 |
1 files changed, 2 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) |