summaryrefslogtreecommitdiff
path: root/com32/hdt/hdt.c
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-12-22 11:51:38 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-12-22 11:51:38 +0000
commit8821237240c5374d83298b2da5ad88fa1e3c1ef7 (patch)
treee1bc03fa83c61165f48ffe3f528ac5496332872a /com32/hdt/hdt.c
parent38dcca25c8855c95649e3f0b5b09fae862ed5c7a (diff)
parent7307d60063ee4303da4de45f9d984fdc8df92146 (diff)
downloadsyslinux-8821237240c5374d83298b2da5ad88fa1e3c1ef7.tar.gz
Merge remote-tracking branch 'remotes/upstream/master' into baserock/morph
Diffstat (limited to 'com32/hdt/hdt.c')
-rw-r--r--com32/hdt/hdt.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/com32/hdt/hdt.c b/com32/hdt/hdt.c
index a1e3923c..653995d0 100644
--- a/com32/hdt/hdt.c
+++ b/com32/hdt/hdt.c
@@ -72,16 +72,23 @@ int main(const int argc, const char *argv[])
clear_screen();
printf("\033[1;1H");
- printf("%s\n", version_string);
+ more_printf("%s\n", version_string);
+
+ int return_code = 0;
if (!menumode || automode)
start_cli_mode(&hardware);
else {
- int return_code = start_menu_mode(&hardware, version_string);
+ return_code = start_menu_mode(&hardware, version_string);
if (return_code == HDT_RETURN_TO_CLI)
start_cli_mode(&hardware);
- else
- return return_code;
}
- return 0;
+
+ /* Do we got request to do something at exit time ? */
+ if (strlen(hardware.postexec)>0) {
+ more_printf("Executing postexec instructions : %s\n",hardware.postexec);
+ runsyslinuxcmd(hardware.postexec);
+ }
+
+ return return_code;
}