---
name: "vfs_rootmountalloc"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/vfs_rootmountalloc"
---

# vfs\_rootmountalloc(9)

allocate a root mount structure

## NAME

**vfs\_rootmountalloc** – allocate a root *mount* structure

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/mount.h\>**

*int*\

**vfs\_rootmountalloc**(*char \*fstypename*, *char \*devname*, *struct mount \*\*mpp*);

## DESCRIPTION

**vfs\_rootmountalloc**() allocates a *mount* structure initialized from the *vfsconf* type that matches *fstypename*.

## RETURN VALUES

If successful, 0 is returned and *mpp* points to the newly allocated *mount* structure. ENODEV is returned if *fstypename* is NULL or invalid.

## SEE ALSO

[vfsconf(9)](/vfsconf/9.md)

## AUTHORS

This manual page was written by Chad David ⟨*davidc@acns.ab.ca*⟩.
