From c778a727738b57d18248be57607cfc5907f29e20 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 5 Nov 1997 02:48:44 +0000 Subject: Document ^D to get out of overlap prompt and remove duplicate exit condition --- sbin/disklabel/editor.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sbin/disklabel') diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 869c234e0cf..17f86c9f44a 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.25 1997/11/04 19:46:39 millert Exp $ */ +/* $OpenBSD: editor.c,v 1.26 1997/11/05 02:48:43 millert Exp $ */ /* * Copyright (c) 1997 Todd C. Miller @@ -31,7 +31,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.25 1997/11/04 19:46:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.26 1997/11/05 02:48:43 millert Exp $"; #endif /* not lint */ #include @@ -1322,15 +1322,14 @@ has_overlap(lp, freep, resolve) /* Get partition to disable or ^D */ do { - printf("Disable which one? [%c %c] ", + printf("Disable which one? (^D to abort) [%c %c] ", 'a' + i, 'a' + j); buf[0] = '\0'; - if (!fgets(buf, sizeof(buf), stdin)) + if (!fgets(buf, sizeof(buf), stdin)) { + putchar('\n'); return(1); /* ^D */ + } c = buf[0] - 'a'; - if ((buf[1] == '\n' || buf[1] == '\0') - && (c == i || c == j)) - break; } while (buf[1] != '\n' && buf[1] != '\0' && c != i && c != j); -- cgit v1.2.3