-/*
- * Check if an option (name=value) is a global option. If so, store it in
- * the global options table, and return 1. Otherwise, return 0.
- */
-static int check_for_global_option(const char *name, const char *value)
-{
- int i;
-
- for (i = 0; global_options[i].name ;i++) {
- if (!strcmp(name, global_options[i].name)) {
- global_options[i].value = strdup(value);
- return 1;
- }
- }
- return 0;
-}
-
-static char *get_global_option(const char *name)
-{
- int i;
-
- for (i = 0; global_options[i].name ;i++)
- if (!strcmp(name, global_options[i].name))
- return global_options[i].value;
-
- return NULL;
-}
-
-static int parse_option(struct boot_option *opt, char *config)
-{
- char *pos, *name, *value, *root, *initrd, *cmdline, *tmp;
-
- root = initrd = cmdline = NULL;
-
- /* remove quotes around the value */
- while (*config == '"' || *config == '\'')
- config++;
-
- pos = config + strlen(config) - 1;
- while (*pos == '"' || *pos == '\'')
- *(pos--) = 0;
-
- if (!strlen(pos))
- return 0;
-
- pos = strchr(config, ' ');