ChangeLog, unix.c:
unix.c (check_mount): Clean up the abort message displayed when the
filesystem is mounted and either stdout or stdin isn't a tty.
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index 82f8c34..073a58b 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -1,4 +1,10 @@
-1999-06-25 <tytso@rsts-11.mit.edu>
+1999-06-30 <tytso@valinux.com>
+
+ * unix.c (check_mount): Clean up the abort message displayed when
+ the filesystem is mounted and either stdout or stdin isn't
+ a tty.
+
+1999-06-25 <tytso@valinux.com>
* e2fsck.h:
* pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode,
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index e25bbf3..ed8082d 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -169,13 +169,15 @@
return;
}
- printf("%s is mounted.\n\n", ctx->device_name);
- printf("\007\007\007\007WARNING!!! Running e2fsck on a mounted filesystem "
- "may cause\nSEVERE filesystem damage.\007\007\007\n\n");
- if (isatty (0) && isatty (1))
- cont = ask_yn("Do you really want to continue", -1);
- else
- cont = 0;
+ printf("%s is mounted. ", ctx->device_name);
+ if (!isatty(0) || !isatty(1)) {
+ printf("Cannot continue, aborting.\n\n");
+ exit(FSCK_ERROR);
+ }
+ printf("\n\n\007\007\007\007WARNING!!! "
+ "Running e2fsck on a mounted filesystem may cause\n"
+ "SEVERE filesystem damage.\007\007\007\n\n");
+ cont = ask_yn("Do you really want to continue", -1);
if (!cont) {
printf ("check aborted.\n");
exit (0);