diff options
author | Erwan Velu <erwanaliasr1@gmail.com> | 2010-06-22 23:30:25 +0200 |
---|---|---|
committer | Erwan Velu <erwanaliasr1@gmail.com> | 2010-06-22 23:30:25 +0200 |
commit | d5ddfb6d284761850d00781ab206254bbe11665b (patch) | |
tree | c5f39284222dca7842840a7612be3270cae6223b /com32/hdt/hdt-menu.c | |
parent | 8cf1cc38bf47c39e40dabf581378a05baa4ed365 (diff) | |
download | syslinux-d5ddfb6d284761850d00781ab206254bbe11665b.tar.gz |
hdt: Using syslinux_reboot() call
Rebooting can be achieved via syslinux_reboot() instead of the useless reboot.c32 module.
Diffstat (limited to 'com32/hdt/hdt-menu.c')
-rw-r--r-- | com32/hdt/hdt-menu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/com32/hdt/hdt-menu.c b/com32/hdt/hdt-menu.c index 4629ee58..219f6987 100644 --- a/com32/hdt/hdt-menu.c +++ b/com32/hdt/hdt-menu.c @@ -28,6 +28,7 @@ #include <unistd.h> #include <memory.h> +#include <syslinux/reboot.h> #include "hdt-menu.h" int start_menu_mode(struct s_hardware *hardware, char *version_string) @@ -64,6 +65,10 @@ int start_menu_mode(struct s_hardware *hardware, char *version_string) (curr->data, HDT_SWITCH_TO_CLI, sizeof(HDT_SWITCH_TO_CLI))) { return HDT_RETURN_TO_CLI; } + if (!strncmp + (curr->data, HDT_REBOOT, sizeof(HDT_REBOOT))) { + syslinux_reboot(1); + } strcpy(cmd, curr->data); /* Use specific syslinux call if needed */ @@ -284,7 +289,7 @@ void compute_main_menu(struct s_hdt_menu *hdt_menu, struct s_hardware *hardware) HDT_SWITCH_TO_CLI, 0); add_item("<A>bout", "About Menu", OPT_SUBMENU, NULL, hdt_menu->about_menu.menu); - add_item("<R>eboot", "Reboot", OPT_RUN, hardware->reboot_label, 0); + add_item("<R>eboot", "Reboot", OPT_RUN, HDT_REBOOT, 0); add_item("E<x>it", "Exit", OPT_EXITMENU, NULL, 0); hdt_menu->main_menu.items_count++; |