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