summaryrefslogtreecommitdiffstats
path: root/sbin/mount
diff options
context:
space:
mode:
authorkeramida <keramida@FreeBSD.org>2006-03-03 02:46:15 +0000
committerkeramida <keramida@FreeBSD.org>2006-03-03 02:46:15 +0000
commit80106a837d1f74780854b066109eeb3cb710a62c (patch)
tree9118b12807fa1c3258ab522f060268a6de76c08b /sbin/mount
parentf24ee2a85ac37b73e73dd84bafdd3152fe2732cb (diff)
downloadFreeBSD-src-80106a837d1f74780854b066109eeb3cb710a62c.zip
FreeBSD-src-80106a837d1f74780854b066109eeb3cb710a62c.tar.gz
When there are no mount options, an implicit "rw" should be printed in
the output of ``mount -p''. Approved by: rodrigc
Diffstat (limited to 'sbin/mount')
-rw-r--r--sbin/mount/mount.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 655ef48..eb0814e 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -754,8 +754,13 @@ putfsent(ent)
char *opts;
opts = flags2opts(ent->f_flags);
+
+ /*
+ * "rw" is not a real mount option; this is why we print NULL as "rw"
+ * if opts is still NULL here.
+ */
printf("%s\t%s\t%s %s", ent->f_mntfromname, ent->f_mntonname,
- ent->f_fstypename, opts);
+ ent->f_fstypename, opts ? opts : "rw");
free(opts);
if ((fst = getfsspec(ent->f_mntfromname)))
OpenPOWER on IntegriCloud