diff options
author | sjelinek <none@none> | 2006-03-23 11:55:37 -0800 |
---|---|---|
committer | sjelinek <none@none> | 2006-03-23 11:55:37 -0800 |
commit | d87feeb8a6f94a6ae8a2aae23d201c4a860a46bb (patch) | |
tree | d05dffa82527bff77359c2facdae2caafad1e5b3 | |
parent | 821a83dbe7cba700cd57da95bf981850118f369e (diff) | |
download | illumos-gate-d87feeb8a6f94a6ae8a2aae23d201c4a860a46bb.tar.gz |
4759320 read-only UFS global mounts should not try to turn on logging
6337386 quota(1M) incorrect usage message for unknown option
Contributed by Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/cmd/fs.d/ufs/mount/mount.c | 21 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/ufs/quota/quota.c | 4 |
2 files changed, 17 insertions, 8 deletions
diff --git a/usr/src/cmd/fs.d/ufs/mount/mount.c b/usr/src/cmd/fs.d/ufs/mount/mount.c index 883da253db..d6d3180bef 100644 --- a/usr/src/cmd/fs.d/ufs/mount/mount.c +++ b/usr/src/cmd/fs.d/ufs/mount/mount.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -534,10 +534,21 @@ mountfs(struct mnttab *mnt) * logging option if its not specified. */ if (gflg || findopt(mnt->mnt_mntopts, MNTOPT_GLOBAL)) { - if (mnt->mnt_mntopts != '\0') - (void) strcat(mnt->mnt_mntopts, ","); - (void) strcat(mnt->mnt_mntopts, MNTOPT_LOGGING); - args.flags |= UFSMNT_LOGGING; + if (!flags & MS_RDONLY) { + if (mnt->mnt_mntopts != '\0') + (void) strcat(mnt->mnt_mntopts, ","); + (void) strcat(mnt->mnt_mntopts, MNTOPT_LOGGING); + args.flags |= UFSMNT_LOGGING; + } else { + /* + * Turn off logging for read only global mounts. + * It was set to logging as default above. + */ + if (mnt->mnt_mntopts != '\0') + (void) strcat(mnt->mnt_mntopts, ","); + (void) strcat(mnt->mnt_mntopts, MNTOPT_NOLOGGING); + args.flags &= ~UFSMNT_LOGGING; + } } again: if (mount(mnt->mnt_special, mnt->mnt_mountp, flags, fstype, diff --git a/usr/src/cmd/fs.d/ufs/quota/quota.c b/usr/src/cmd/fs.d/ufs/quota/quota.c index 3e15ba8a94..4aa3132f24 100644 --- a/usr/src/cmd/fs.d/ufs/quota/quota.c +++ b/usr/src/cmd/fs.d/ufs/quota/quota.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -109,8 +109,6 @@ main(int argc, char *argv[]) break; case '?': - fprintf(stderr, "quota: %c: unknown option\n", - opt); fprintf(stderr, "ufs usage: quota [-v] [username]\n"); exit(32); } |