diff options
Diffstat (limited to 'com32/menu/menumain.c')
-rw-r--r-- | com32/menu/menumain.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c index f7af90aa..c3da97e4 100644 --- a/com32/menu/menumain.c +++ b/com32/menu/menumain.c @@ -1,6 +1,7 @@ /* ----------------------------------------------------------------------- * * * Copyright 2004-2008 H. Peter Anvin - All Rights Reserved + * Copyright 2009 Intel Corporation; author: H. Peter Anvin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +28,7 @@ #include <setjmp.h> #include <limits.h> #include <com32.h> +#include <syslinux/adv.h> #include "menu.h" @@ -875,6 +877,13 @@ run_menu(void) break; } } + if (done && !me->passwd) { + /* Only save a new default if we don't have a password... */ + if (menusave && me->label) { + syslinux_setadv(ADV_MENUSAVE, strlen(me->label), me->label); + syslinux_adv_write(); + } + } break; case KEY_UP: |