| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: rumpnfsd.c,v 1.3 2010/07/30 21:10:44 pooka Exp $ */ | | 1 | /* $NetBSD: rumpnfsd.c,v 1.4 2010/08/05 16:47:59 pooka Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2010 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2010 The NetBSD Foundation, Inc. |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | | 10 | * notice, this list of conditions and the following disclaimer. |
11 | * 2. Redistributions in binary form must reproduce the above copyright | | 11 | * 2. Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the | | 12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. | | 13 | * documentation and/or other materials provided with the distribution. |
14 | * | | 14 | * |
| @@ -82,27 +82,26 @@ main(int argc, char *argv[]) | | | @@ -82,27 +82,26 @@ main(int argc, char *argv[]) |
82 | rump_init(); | | 82 | rump_init(); |
83 | init_fdsets(); | | 83 | init_fdsets(); |
84 | | | 84 | |
85 | rv = rump_pub_etfs_register("/etc/exports", "./exports", RUMP_ETFS_REG); | | 85 | rv = rump_pub_etfs_register("/etc/exports", "./exports", RUMP_ETFS_REG); |
86 | if (rv) { | | 86 | if (rv) { |
87 | errx(1, "register /etc/exports: %s", strerror(rv)); | | 87 | errx(1, "register /etc/exports: %s", strerror(rv)); |
88 | } | | 88 | } |
89 | | | 89 | |
90 | /* mini-mtree for mountd */ | | 90 | /* mini-mtree for mountd */ |
91 | rump_sys_mkdir("/var", 0777); | | 91 | rump_sys_mkdir("/var", 0777); |
92 | rump_sys_mkdir("/var/run", 0777); | | 92 | rump_sys_mkdir("/var/run", 0777); |
93 | rump_sys_mkdir("/var/db", 0777); | | 93 | rump_sys_mkdir("/var/db", 0777); |
94 | | | 94 | |
95 | fprintf(stderr, "imagename %s\n", imagename); | | | |
96 | if (ffs_fstest_newfs(NULL, &fsarg, | | 95 | if (ffs_fstest_newfs(NULL, &fsarg, |
97 | FSTEST_IMGNAME, FSTEST_IMGSIZE, NULL) != 0) | | 96 | FSTEST_IMGNAME, FSTEST_IMGSIZE, NULL) != 0) |
98 | atf_tc_fail("newfs failed"); | | 97 | atf_tc_fail("newfs failed"); |
99 | if (ffs_fstest_mount(NULL, fsarg, exportpath, 0) != 0) | | 98 | if (ffs_fstest_mount(NULL, fsarg, exportpath, 0) != 0) |
100 | atf_tc_fail("mount failed"); | | 99 | atf_tc_fail("mount failed"); |
101 | | | 100 | |
102 | #if 0 | | 101 | #if 0 |
103 | /* | | 102 | /* |
104 | * Serve from host instead of dedicated mount? | | 103 | * Serve from host instead of dedicated mount? |
105 | * THIS IS MORE EVIL THAN MURRAY THE DEMONIC TALKING SKULL! | | 104 | * THIS IS MORE EVIL THAN MURRAY THE DEMONIC TALKING SKULL! |
106 | */ | | 105 | */ |
107 | | | 106 | |
108 | if (ukfs_modload("/usr/lib/librumpfs_syspuffs.so") < 1) | | 107 | if (ukfs_modload("/usr/lib/librumpfs_syspuffs.so") < 1) |