From 0d867a28388e6ef7ba3d23e4f662d4e5ae00ac04 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 18 Jun 2007 16:59:05 +0200 Subject: added support for 'savedefault savemap' --- stage2/builtins.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stage2/builtins.c b/stage2/builtins.c index 7117e3e..45307c6 100644 --- a/stage2/builtins.c +++ b/stage2/builtins.c @@ -3343,6 +3343,8 @@ savedefault_func (char *arg, int flags) entryno = fallback_entries[index]; } + else if (grub_memcmp (arg, "savemap", sizeof ("savemap") - 1) == 0) + entryno = backup_entry; else if (! safe_parse_maxint (&arg, &entryno)) return 1; } @@ -3431,10 +3433,11 @@ static struct builtin builtin_savedefault = "savedefault", savedefault_func, BUILTIN_CMDLINE, - "savedefault [NUM | `fallback']", + "savedefault [NUM | `fallback' | 'savemap']", "Save the current entry as the default boot entry if no argument is" " specified. If a number is specified, this number is saved. If" - " `fallback' is used, next fallback entry is saved." + " `fallback' is used, next fallback entry is saved. If 'savemap'" + " is used, next boot will follow the save map." }; -- 1.4.4.3