diff options
author | Thomas Bächler <thomas@archlinux.org> | 2010-06-07 21:23:46 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-07 14:54:25 -0700 |
commit | 7f0b9b9404ba90009b656c80fb5caa444b47be9d (patch) | |
tree | a14504dda1a6fc1105cd7b68260c44b6670cea6d /extlinux | |
parent | 068684738163202cbfe02eede0e9f7239492b35d (diff) | |
download | syslinux-7f0b9b9404ba90009b656c80fb5caa444b47be9d.tar.gz |
extlinux: add a --menu-save option
Add the --menu-save option to set the MENU SAVE value from the running
system using extlinux.
From: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'extlinux')
-rw-r--r-- | extlinux/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/extlinux/main.c b/extlinux/main.c index 0669bb9c..8a0ac63b 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -381,6 +381,13 @@ int modify_adv(void) rv = -1; } } + if (opt.menu_save) { + if (syslinux_setadv(ADV_MENUSAVE, strlen(opt.menu_save), opt.menu_save)) { + fprintf(stderr, "%s: not enough space for menu-save label\n", + program); + rv = -1; + } + } return rv; } @@ -877,7 +884,7 @@ int main(int argc, char *argv[]) usage(EX_USAGE, 0); if (opt.update_only == -1) { - if (opt.reset_adv || opt.set_once) + if (opt.reset_adv || opt.set_once || opt.menu_save) return modify_existing_adv(opt.directory); else usage(EX_USAGE, 0); |