diff options
author | ache <ache@FreeBSD.org> | 1994-11-18 23:34:05 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-11-18 23:34:05 +0000 |
commit | 36b86c098c688d9c2993fe1e710b6189634f52e0 (patch) | |
tree | 1825f1d9fe3bd14fccef082e42d1c7be6f426814 /sbin/sysinstall | |
parent | 3bd8d2abd314c1f786c38b6dab6b7880c65f762f (diff) | |
download | FreeBSD-src-36b86c098c688d9c2993fe1e710b6189634f52e0.zip FreeBSD-src-36b86c098c688d9c2993fe1e710b6189634f52e0.tar.gz |
Fix dialog things broken by previous commiter
Diffstat (limited to 'sbin/sysinstall')
-rw-r--r-- | sbin/sysinstall/stage1.c | 16 | ||||
-rw-r--r-- | sbin/sysinstall/sysinstall.h | 3 |
2 files changed, 12 insertions, 7 deletions
diff --git a/sbin/sysinstall/stage1.c b/sbin/sysinstall/stage1.c index 2da76f5..aee2f36 100644 --- a/sbin/sysinstall/stage1.c +++ b/sbin/sysinstall/stage1.c @@ -202,10 +202,10 @@ select_disk() sprintf(options[no_disks*2], "%d", no_disks+1); sprintf(options[(no_disks*2)+1], " Done"); - dialog_clear(); - if (dialog_menu("FreeBSD Installation", scratch, 10, 75, 5, no_disks+1, + dialog_clear_norefresh(); + if (dialog_menu("FreeBSD Installation", scratch, -1, -1, min(5,no_disks+1), no_disks+1, options, selection)) { - dialog_clear(); + dialog_clear_norefresh(); sprintf(scratch,"\n\n\nYou selected cancel\n\n"); AskAbort(scratch); valid = 0; @@ -253,9 +253,10 @@ configure_disks() sprintf(options[(items*2)+1], "Done"); items++; - if (dialog_menu("FreeBSD Installation", scratch, 10, 75, 5, items, + dialog_clear_norefresh(); + if (dialog_menu("FreeBSD Installation", scratch, -1, -1, min(5,items), items, options, selection)) { - dialog_clear(); + dialog_clear_norefresh(); sprintf(scratch,"\n\n\nYou selected cancel\n\n"); AskAbort(scratch); valid = 0; @@ -297,10 +298,11 @@ select_partition(int disk) part_type(disk_list[disk].mbr.dospart[i].dp_typ), disk_list[disk].mbr.dospart[i].dp_size * 512 / (1024 * 1024)); } + dialog_clear_norefresh(); if (dialog_menu(TITLE, - scratch, 10, 75, 4, 4, options, selection)) { + scratch, -1, -1, 4, 4, options, selection)) { sprintf(scratch,"You did not select a valid partition"); - dialog_clear(); + dialog_clear_norefresh(); AskAbort(scratch); valid = 0; } diff --git a/sbin/sysinstall/sysinstall.h b/sbin/sysinstall/sysinstall.h index 3d41e5a..0222bcf 100644 --- a/sbin/sysinstall/sysinstall.h +++ b/sbin/sysinstall/sysinstall.h @@ -36,6 +36,9 @@ #include <sys/dkbad.h> #include <sys/disklabel.h> +#define min(a,b) ((a) < (b) ? (a) : (b)) +#define max(a,b) ((a) > (b) ? (a) : (b)) + #define SCRATCHSIZE 1024 #define ERRMSGSIZE 256 #define DEFROOTSIZE 18 |