From: Jorrit Herder Date: Fri, 12 Aug 2005 12:13:11 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: v3.1.0~354 X-Git-Url: http://zhaoyanbai.com/repos/doc/html/static/gitweb.css?a=commitdiff_plain;h=414614e60f027e2ef26c19e743644d3e67cdb344;p=minix.git *** empty log message *** --- diff --git a/commands/ibm/autopart.c b/commands/ibm/autopart.c index c277ebf3b..447958c76 100755 --- a/commands/ibm/autopart.c +++ b/commands/ibm/autopart.c @@ -2307,6 +2307,11 @@ is_sure(int flags, char *fmt, ...) return !strncmp(yesno, "yes", 3); } +void warn(char *message) +{ + printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b ! %s\n",message); +} + int may_kill_region(void) { @@ -2491,9 +2496,12 @@ select_disk(void) fflush(NULL); if(!fgets(line, sizeof(line)-2, stdin)) exit(1); - if(sscanf(line, "%d", &choice) != 1) continue; + if(sscanf(line, "%d", &choice) != 1) { + warn("choose a disk"); + continue; + } if(choice < 0 || choice >= i) { - printf("\b\b\b\b\b\b\b\b\b\b\b\b\b ! out of range.\n"); + warn("out of range"); continue; } done = 1;