diff options
author | Alan Somers <asomers@FreeBSD.org> | 2022-04-29 16:43:47 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2022-04-29 17:10:03 +0000 |
commit | 2f6362484c0e1250ef6a76cccdbe4a95587e850c (patch) | |
tree | bfbf499f5c4814543432b96c0b618b41ad9101ef /sbin/mount_fusefs | |
parent | 616eaa66aa4955f182eb0117e17e07da76fcf696 (diff) |
fusefs: use the fsname mount option if set
The daemon can specify fsname=XXX in its mount options. If so, the file
system should report f_mntfromname as XXX during statfs. This will show
up in the output of commands like mount and df.
Submitted by: Ali Abdallah <ali.abdallah@suse.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35090
Diffstat (limited to 'sbin/mount_fusefs')
-rw-r--r-- | sbin/mount_fusefs/mount_fusefs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/mount_fusefs/mount_fusefs.c b/sbin/mount_fusefs/mount_fusefs.c index 33667c035e32..9cb5de66d2dd 100644 --- a/sbin/mount_fusefs/mount_fusefs.c +++ b/sbin/mount_fusefs/mount_fusefs.c @@ -77,6 +77,8 @@ static struct mntopt mopts[] = { { "max_read=", 0, ALTF_MAXREAD, 1 }, #define ALTF_SUBTYPE 0x40 { "subtype=", 0, ALTF_SUBTYPE, 1 }, + #define ALTF_FSNAME 0x80 + { "fsname=", 0, ALTF_FSNAME, 1 }, /* * MOPT_AUTOMOUNTED, included by MOPT_STDOPTS, does not fit into * the 'flags' argument to nmount(2). We have to abuse altflags @@ -87,7 +89,6 @@ static struct mntopt mopts[] = { #define ALTF_INTR 0x200 { "intr", 0, ALTF_INTR, 1 }, /* Linux specific options, we silently ignore them */ - { "fsname=", 0, 0x00, 1 }, { "fd=", 0, 0x00, 1 }, { "rootmode=", 0, 0x00, 1 }, { "user_id=", 0, 0x00, 1 }, @@ -110,6 +111,7 @@ struct mntval { static struct mntval mvals[] = { { ALTF_MAXREAD, NULL, 0 }, { ALTF_SUBTYPE, NULL, 0 }, + { ALTF_FSNAME, NULL, 0 }, { 0, NULL, 0 } }; @@ -474,8 +476,8 @@ helpmsg(void) /* " -o nonempty allow mounts over non-empty file/dir\n" */ " -o default_permissions enable permission checking by kernel\n" " -o intr interruptible mount\n" - /* " -o fsname=NAME set filesystem name\n" + /* " -o large_read issue large read requests (2.4 only)\n" */ " -o subtype=NAME set filesystem type\n" |