* A printflike function to mount a filesystem. */
| 2451 | * A printflike function to mount a filesystem. |
| 2452 | */ |
| 2453 | int |
| 2454 | kernel_vmount(int flags, ...) |
| 2455 | { |
| 2456 | struct mntarg *ma = NULL; |
| 2457 | va_list ap; |
| 2458 | const char *cp; |
| 2459 | const void *vp; |
| 2460 | int error; |
| 2461 | |
| 2462 | va_start(ap, flags); |
| 2463 | for (;;) { |
| 2464 | cp = va_arg(ap, const char *); |
| 2465 | if (cp == NULL) |
| 2466 | break; |
| 2467 | vp = va_arg(ap, const void *); |
| 2468 | ma = mount_arg(ma, cp, vp, (vp != NULL ? -1 : 0)); |
| 2469 | } |
| 2470 | va_end(ap); |
| 2471 | |
| 2472 | error = kernel_mount(ma, flags); |
| 2473 | return (error); |
| 2474 | } |
| 2475 | |
| 2476 | /* Map from mount options to printable formats. */ |
| 2477 | static struct mntoptnames optnames[] = { |
nothing calls this directly
no test coverage detected