diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/fs.d/ufs/fsck/main.c | 4 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/ufs/fsck/setup.c | 19 |
2 files changed, 15 insertions, 8 deletions
diff --git a/usr/src/cmd/fs.d/ufs/fsck/main.c b/usr/src/cmd/fs.d/ufs/fsck/main.c index b8d8f1ed13..57970fc67b 100644 --- a/usr/src/cmd/fs.d/ufs/fsck/main.c +++ b/usr/src/cmd/fs.d/ufs/fsck/main.c @@ -1,5 +1,5 @@ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -469,7 +469,7 @@ recount: iscorrupt = 1; } - if (mountedfs == M_RW) { + if (!nflag && mountedfs == M_RW) { iscorrupt = 1; } diff --git a/usr/src/cmd/fs.d/ufs/fsck/setup.c b/usr/src/cmd/fs.d/ufs/fsck/setup.c index feaf2fa400..a0d32b926c 100644 --- a/usr/src/cmd/fs.d/ufs/fsck/setup.c +++ b/usr/src/cmd/fs.d/ufs/fsck/setup.c @@ -1,5 +1,5 @@ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -460,11 +460,18 @@ check_mount_state(caddr_t devstr, size_t str_size) pfatal("%s IS CURRENTLY MOUNTED%s.", devstr, mountedfs == M_RW ? " READ/WRITE" : ""); } else { - pwarn("%s IS CURRENTLY MOUNTED READ/%s.", - devstr, mountedfs == M_RW ? "WRITE" : "ONLY"); - if (reply("CONTINUE") == 0) { - exitstat = EXMOUNTED; - errexit("Program terminated"); + if (!nflag) { + pwarn("%s IS CURRENTLY MOUNTED READ/%s.", + devstr, mountedfs == M_RW ? "WRITE" : + "ONLY"); + if (reply("CONTINUE") == 0) { + exitstat = EXMOUNTED; + errexit("Program terminated"); + } + } else { + pwarn("%s IS CURRENTLY MOUNTED READ/%s.\n", + devstr, mountedfs == M_RW ? "WRITE" : + "ONLY"); } } } else if (is_dev && rflag) { |