When there are no mount options, an implicit "rw" should be printed in

the output of ``mount -p''.

Approved by:	rodrigc
This commit is contained in:
Giorgos Keramidas 2006-03-03 02:46:15 +00:00
parent b4130b8ae0
commit 3ae7ea6834

View File

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