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.
This commit is contained in:
Theodore Ts'o 1999-07-01 03:00:47 +00:00
parent ca3c328510
commit 7403335006
2 changed files with 16 additions and 8 deletions

View File

@ -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,

View File

@ -169,13 +169,15 @@ static void check_mount(e2fsck_t ctx)
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);