summaryrefslogtreecommitdiffstats
path: root/sbin/mount
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2011-07-24 18:27:09 +0000
committermckusick <mckusick@FreeBSD.org>2011-07-24 18:27:09 +0000
commitffeefed9fc8fa85d3fcbd19640ba38e51e2ff4da (patch)
treedff2f2c8a3cdf5485267a96d12dd0c20f58da76d /sbin/mount
parent64e0ba1afe60a4c7d7a1960154875516b560d46c (diff)
downloadFreeBSD-src-ffeefed9fc8fa85d3fcbd19640ba38e51e2ff4da.zip
FreeBSD-src-ffeefed9fc8fa85d3fcbd19640ba38e51e2ff4da.tar.gz
Move the MNTK_SUJ flag in mnt_kern_flag to MNT_SUJ in mnt_flag
so that it is visible to userland programs. This change enables the `mount' command with no arguments to be able to show if a filesystem is mounted using journaled soft updates as opposed to just normal soft updates. Approved by: re (bz)
Diffstat (limited to 'sbin/mount')
-rw-r--r--sbin/mount/mount.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 2229419..61d1747 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -109,6 +109,7 @@ static struct opt {
{ MNT_NOCLUSTERW, "noclusterw" },
{ MNT_SUIDDIR, "suiddir" },
{ MNT_SOFTDEP, "soft-updates" },
+ { MNT_SUJ, "journaled soft-updates" },
{ MNT_MULTILABEL, "multilabel" },
{ MNT_ACLS, "acls" },
{ MNT_NFS4ACLS, "nfsv4acls" },
@@ -316,7 +317,7 @@ main(int argc, char *argv[])
rval = 0;
switch (argc) {
case 0:
- if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0)
+ if ((mntsize = getmntinfo(&mntbuf, MNT_WAIT)) == 0)
err(1, "getmntinfo");
if (all) {
while ((fs = getfsent()) != NULL) {
@@ -665,7 +666,7 @@ getmntpt(const char *name)
struct statfs *mntbuf;
int i, mntsize;
- mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
+ mntsize = getmntinfo(&mntbuf, MNT_WAIT);
for (i = mntsize - 1; i >= 0; i--) {
if (strcmp(mntbuf[i].f_mntfromname, name) == 0 ||
strcmp(mntbuf[i].f_mntonname, name) == 0)
OpenPOWER on IntegriCloud