Lines Matching refs:option
27 enum efi_cmdline_option option; member
36 } cmdline = { .option = EFI_CMDLINE_NONE };
38 static bool parse_modenum(char *option, char **next) in parse_modenum() argument
42 if (!strstarts(option, "mode=")) in parse_modenum()
44 option += strlen("mode="); in parse_modenum()
45 m = simple_strtoull(option, &option, 0); in parse_modenum()
46 if (*option && *option++ != ',') in parse_modenum()
48 cmdline.option = EFI_CMDLINE_MODE_NUM; in parse_modenum()
51 *next = option; in parse_modenum()
55 static bool parse_res(char *option, char **next) in parse_res() argument
60 if (!isdigit(*option)) in parse_res()
62 w = simple_strtoull(option, &option, 10); in parse_res()
63 if (*option++ != 'x' || !isdigit(*option)) in parse_res()
65 h = simple_strtoull(option, &option, 10); in parse_res()
66 if (*option == '-') { in parse_res()
67 option++; in parse_res()
68 if (strstarts(option, "rgb")) { in parse_res()
69 option += strlen("rgb"); in parse_res()
71 } else if (strstarts(option, "bgr")) { in parse_res()
72 option += strlen("bgr"); in parse_res()
74 } else if (isdigit(*option)) in parse_res()
75 d = simple_strtoull(option, &option, 10); in parse_res()
79 if (*option && *option++ != ',') in parse_res()
81 cmdline.option = EFI_CMDLINE_RES; in parse_res()
87 *next = option; in parse_res()
91 static bool parse_auto(char *option, char **next) in parse_auto() argument
93 if (!strstarts(option, "auto")) in parse_auto()
95 option += strlen("auto"); in parse_auto()
96 if (*option && *option++ != ',') in parse_auto()
98 cmdline.option = EFI_CMDLINE_AUTO; in parse_auto()
100 *next = option; in parse_auto()
104 static bool parse_list(char *option, char **next) in parse_list() argument
106 if (!strstarts(option, "list")) in parse_list()
108 option += strlen("list"); in parse_list()
109 if (*option && *option++ != ',') in parse_list()
111 cmdline.option = EFI_CMDLINE_LIST; in parse_list()
113 *next = option; in parse_list()
117 void efi_parse_option_graphics(char *option) in efi_parse_option_graphics() argument
119 while (*option) { in efi_parse_option_graphics()
120 if (parse_modenum(option, &option)) in efi_parse_option_graphics()
122 if (parse_res(option, &option)) in efi_parse_option_graphics()
124 if (parse_auto(option, &option)) in efi_parse_option_graphics()
126 if (parse_list(option, &option)) in efi_parse_option_graphics()
129 while (*option && *option++ != ',') in efi_parse_option_graphics()
390 switch (cmdline.option) { in set_mode()