diff --git a/sbin/mount_fusefs/mount_fusefs.c b/sbin/mount_fusefs/mount_fusefs.c index 797aba7..72445e7 100644 --- a/sbin/mount_fusefs/mount_fusefs.c +++ b/sbin/mount_fusefs/mount_fusefs.c @@ -82,6 +82,14 @@ static struct mntopt mopts[] = { { "large_read", 0, 0x00, 1 }, /* "nonempty", just the first two chars are stripped off during parsing */ { "nempty", 0, 0x00, 1 }, + /* + * MOPT_AUTOMOUNTED, included by MOPT_STDOPTS, is useless because + * unfortunately MNT_AUTOMOUNTED does not fit into flags of nmount(2). + * We have to abuse altflags to pass this option via iovec ATM. + * refs bug 192852 + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192852 + */ + { "automounted", 0, 0x80000000ll, 1 }, MOPT_STDOPTS, MOPT_END }; @@ -262,7 +270,9 @@ main(int argc, char *argv[]) if (! (dev && dir)) errx(1, "missing special and/or mountpoint"); - for (mo = mopts; mo->m_flag; ++mo) { + for (mo = mopts; mo->m_option; ++mo) { + if (!mo->m_altloc) + continue; if (altflags & mo->m_flag) { int iov_done = 0;