T_PROMPT,
T_INCLUDE,
T_FDT,
+ T_ONTIMEOUT,
T_INVALID
};
{"initrd", T_INITRD},
{"include", T_INCLUDE},
{"fdt", T_FDT},
+ {"ontimeout", T_ONTIMEOUT,},
{NULL, T_INVALID}
};
switch (t.type) {
case T_DEFAULT:
- if (cfg->default_label)
- free(cfg->default_label);
-
- cfg->default_label = strdup(label->name);
+ if (!cfg->default_label)
+ cfg->default_label = strdup(label->name);
if (!cfg->default_label)
return -ENOMEM;
break;
case T_DEFAULT:
+ case T_ONTIMEOUT:
err = parse_sliteral(&p, &label_name);
if (label_name) {
return NULL;
}
if (cfg->default_label &&
- (strcmp(label->name, cfg->default_label) == 0))
+ (strcmp(label->name, cfg->default_label) == 0))
default_num = label->num;
}