From 366ff957d2900eae6d26ad2f002b735302e7eb41 Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Mon, 15 Dec 2014 14:57:35 +1100 Subject: lib: Define autoboot_options, device_type helpers Add the new autoboot_option struct, and helper functions for working with device_type enums. device_type_name() returns exact strings as used by platform code to read/write nvram params, so device_type_display_name() is added for use in user-visible strings. Signed-off-by: Samuel Mendoza-Jonas --- discover/platform.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'discover') diff --git a/discover/platform.c b/discover/platform.c index 04798ac..4451589 100644 --- a/discover/platform.c +++ b/discover/platform.c @@ -17,23 +17,6 @@ static struct config *config; static const char *kernel_cmdline_debug = "petitboot.debug"; -static const char *device_type_name(enum device_type type) -{ - switch (type) { - case DEVICE_TYPE_DISK: - return "disk"; - case DEVICE_TYPE_OPTICAL: - return "optical"; - case DEVICE_TYPE_NETWORK: - return "network"; - case DEVICE_TYPE_ANY: - return "any"; - case DEVICE_TYPE_UNKNOWN: - default: - return "unknown"; - } -} - static void dump_config(struct config *config) { unsigned int i; -- cgit v1.2.1