mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-27 20:14:46 +08:00
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:
parent
ca3c328510
commit
7403335006
@ -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,
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user