* Mount a filesystem */
| 2427 | * Mount a filesystem |
| 2428 | */ |
| 2429 | int |
| 2430 | kernel_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. |
no test coverage detected