Lines Matching refs:option

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