RFC: checking file systems support UF_HIDDEN, UF_SYSTEM
- Reply: Shawn Webb : "Re: RFC: checking file systems support UF_HIDDEN, UF_SYSTEM"
- Reply: Alan Somers : "Re: RFC: checking file systems support UF_HIDDEN, UF_SYSTEM" {{#reference}}
- In reply to: {{ref.name}}: "{{ref.subject}}"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 02 Jul 2025 21:02:14 UTC
Hi,
I am implementing the "hidden" and "system" attributes for
NFSv4 using UF_HIDDEN and UF_SYSTEM.
In a couple of places in the code, I need to know if a file
system supports these flags.
I can think of two ways to do this.
#1 - Create a new VFCF_HIDSYS flag that is set via VFS_SET()
for file systems that support the UF_HIDDEN and UF_SYSTEM
flags and test for that flag being set.
or
#2 - Write it this way...
if (strcmp(vp->v_mount->mnt_vfc->vfc_name, "zfs") != 0 ||
strcmp(vp->v_mount->mnt_vfc->vfc_name, "ufs") != 0 ||
strcmp(vp->v_mount->mnt_vfc->vfc_name, "msdosfs") != 0 ||
strcmp(vp->v_mount->mnt_vfc->vfc_name, "tmpfs") != 0)
Which do you think is preferable (or do you have another idea)?
Thanks for any comments, rick