ExitSysinstall() fixed:

use dialog functions properly.
don't clear screen with last message on exit(0), I want to see it still.
relay on dialog_active properly.
This commit is contained in:
Andrey A. Chernov 1994-10-22 02:32:16 +00:00
parent 901ba606c5
commit 70f29f87cd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3769

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
* *
* $Id: utils.c,v 1.6 1994/10/21 04:43:07 ache Exp $ * $Id: utils.c,v 1.7 1994/10/21 18:08:33 paul Exp $
* *
*/ */
@ -93,20 +93,25 @@ void
ExitSysinstall() ExitSysinstall()
{ {
if (getpid() == 1) { if (getpid() == 1) {
if (dialog_active) {
clear(); clear();
dialog_update();
}
if (reboot(RB_AUTOBOOT) == -1) if (reboot(RB_AUTOBOOT) == -1)
if (dialog_active) { if (dialog_active) {
dialog_clear(); clear();
dialog_msgbox(TITLE, "\n\nCan't reboot machine -- hit reset button", dialog_msgbox(TITLE, "\n\nCan't reboot machine -- hit reset button",
5,30,0); 5,30,0);
} else } else
fprintf(stderr, "Can't reboot the machine -- hit the reset button"); fprintf(stderr, "Can't reboot the machine -- hit the reset button");
while(1); while(1);
} else } else {
clear(); if (dialog_active) {
refresh(); dialog_update();
end_dialog(); end_dialog();
}
exit(0); exit(0);
}
} }
void * void *