MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kernel_mount

Function kernel_mount

freebsd/kern/vfs_mount.c:2429–2448  ·  view source on GitHub ↗

* Mount a filesystem */

Source from the content-addressed store, hash-verified

2427 * Mount a filesystem
2428 */
2429int
2430kernel_mount(struct mntarg *ma, uint64_t flags)
2431{
2432 struct uio auio;
2433 int error;
2434
2435 KASSERT(ma != NULL, ("kernel_mount NULL ma"));
2436 KASSERT(ma->v != NULL, ("kernel_mount NULL ma->v"));
2437 KASSERT(!(ma->len & 1), ("kernel_mount odd ma->len (%d)", ma->len));
2438
2439 auio.uio_iov = ma->v;
2440 auio.uio_iovcnt = ma->len;
2441 auio.uio_segflg = UIO_SYSSPACE;
2442
2443 error = ma->error;
2444 if (!error)
2445 error = vfs_donmount(curthread, flags, &auio);
2446 free_mntarg(ma);
2447 return (error);
2448}
2449
2450/*
2451 * A printflike function to mount a filesystem.

Callers 2

parse_mountFunction · 0.85
kernel_vmountFunction · 0.85

Calls 2

vfs_donmountFunction · 0.85
free_mntargFunction · 0.85

Tested by

no test coverage detected