[CFR][DEVFS] Add "ruleset" mount option

Jaakko Heinonen jh at FreeBSD.org
Mon Feb 6 17:40:22 UTC 2012


On 2012-02-06, Martin Matuska wrote:
> The attached patch adds a "ruleset" mount option to devfs mounts.

> +	if (mp->mnt_optnew != NULL &&
> +	    vfs_getopt(mp->mnt_optnew, "ruleset", NULL, NULL) == 0) {
> +		if (vfs_scanopt(mp->mnt_optnew, "ruleset", "%d",
> +		    &rsnum) != 1) {
> +			vfs_mount_error(mp, "%s",
> +			    "invalid ruleset specification");
> +			return (EINVAL);
> +		}
> +	}

The "ruleset" mount option will persist after the devfs_mount() call. It
will get out of sync if the ruleset is later changed with the devfs
command.

devfs_mount() seems to miss a vfs_filteropt(9) call.

-- 
Jaakko


More information about the freebsd-fs mailing list