1*bde22697Spooka /* $NetBSD: rump_kernfs.c,v 1.1 2010/03/31 14:22:27 pooka Exp $ */
2*bde22697Spooka
3*bde22697Spooka /*
4*bde22697Spooka * Copyright (c) 2008 Antti Kantee. All Rights Reserved.
5*bde22697Spooka *
6*bde22697Spooka * Redistribution and use in source and binary forms, with or without
7*bde22697Spooka * modification, are permitted provided that the following conditions
8*bde22697Spooka * are met:
9*bde22697Spooka * 1. Redistributions of source code must retain the above copyright
10*bde22697Spooka * notice, this list of conditions and the following disclaimer.
11*bde22697Spooka * 2. Redistributions in binary form must reproduce the above copyright
12*bde22697Spooka * notice, this list of conditions and the following disclaimer in the
13*bde22697Spooka * documentation and/or other materials provided with the distribution.
14*bde22697Spooka *
15*bde22697Spooka * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
16*bde22697Spooka * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17*bde22697Spooka * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18*bde22697Spooka * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19*bde22697Spooka * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20*bde22697Spooka * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21*bde22697Spooka * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22*bde22697Spooka * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23*bde22697Spooka * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24*bde22697Spooka * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25*bde22697Spooka * SUCH DAMAGE.
26*bde22697Spooka */
27*bde22697Spooka
28*bde22697Spooka #include <sys/types.h>
29*bde22697Spooka #include <sys/mount.h>
30*bde22697Spooka
31*bde22697Spooka #include <err.h>
32*bde22697Spooka #include <puffs.h>
33*bde22697Spooka #include <stdlib.h>
34*bde22697Spooka #include <unistd.h>
35*bde22697Spooka
36*bde22697Spooka #include <rump/p2k.h>
37*bde22697Spooka
38*bde22697Spooka #include "mount_kernfs.h"
39*bde22697Spooka
40*bde22697Spooka int
main(int argc,char * argv[])41*bde22697Spooka main(int argc, char *argv[])
42*bde22697Spooka {
43*bde22697Spooka char canon_dev[MAXPATHLEN], canon_dir[MAXPATHLEN];
44*bde22697Spooka int mntflags;
45*bde22697Spooka int rv;
46*bde22697Spooka
47*bde22697Spooka setprogname(argv[0]);
48*bde22697Spooka
49*bde22697Spooka mount_kernfs_parseargs(argc, argv, NULL, &mntflags,
50*bde22697Spooka canon_dev, canon_dir);
51*bde22697Spooka rv = p2k_run_fs(MOUNT_KERNFS, canon_dev, canon_dir, mntflags,
52*bde22697Spooka NULL, 0, PUFFS_KFLAG_NOCACHE);
53*bde22697Spooka if (rv)
54*bde22697Spooka err(1, "mount");
55*bde22697Spooka
56*bde22697Spooka return 0;
57*bde22697Spooka }
58