| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: p2k.c,v 1.4 2008/09/30 17:18:46 pooka Exp $ */ | | 1 | /* $NetBSD: p2k.c,v 1.5 2008/10/07 23:14:58 pooka Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. | | 4 | * Copyright (c) 2007 Antti Kantee. All Rights Reserved. |
5 | * | | 5 | * |
6 | * Development of this software was supported by Google Summer of Code. | | 6 | * Development of this software was supported by Google Summer of Code. |
7 | * | | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | | 9 | * modification, are permitted provided that the following conditions |
10 | * are met: | | 10 | * are met: |
11 | * 1. Redistributions of source code must retain the above copyright | | 11 | * 1. Redistributions of source code must retain the above copyright |
12 | * notice, this list of conditions and the following disclaimer. | | 12 | * notice, this list of conditions and the following disclaimer. |
13 | * 2. Redistributions in binary form must reproduce the above copyright | | 13 | * 2. Redistributions in binary form must reproduce the above copyright |
14 | * notice, this list of conditions and the following disclaimer in the | | 14 | * notice, this list of conditions and the following disclaimer in the |
| @@ -136,27 +136,28 @@ int | | | @@ -136,27 +136,28 @@ int |
136 | p2k_run_fs(const char *vfsname, const char *devpath, const char *mountpath, | | 136 | p2k_run_fs(const char *vfsname, const char *devpath, const char *mountpath, |
137 | int mntflags, void *arg, size_t alen, uint32_t puffs_flags) | | 137 | int mntflags, void *arg, size_t alen, uint32_t puffs_flags) |
138 | { | | 138 | { |
139 | char typebuf[PUFFS_TYPELEN]; | | 139 | char typebuf[PUFFS_TYPELEN]; |
140 | struct puffs_ops *pops; | | 140 | struct puffs_ops *pops; |
141 | struct puffs_usermount *pu; | | 141 | struct puffs_usermount *pu; |
142 | struct puffs_node *pn_root; | | 142 | struct puffs_node *pn_root; |
143 | struct vnode *rvp; | | 143 | struct vnode *rvp; |
144 | struct ukfs *ukfs; | | 144 | struct ukfs *ukfs; |
145 | extern int puffs_fakecc; | | 145 | extern int puffs_fakecc; |
146 | int rv, sverrno; | | 146 | int rv, sverrno; |
147 | | | 147 | |
148 | rv = -1; | | 148 | rv = -1; |
149 | ukfs_init(); | | 149 | if (ukfs_init() == -1) |
| | | 150 | return -1; |
150 | ukfs = ukfs_mount(vfsname, devpath, mountpath, mntflags, arg, alen); | | 151 | ukfs = ukfs_mount(vfsname, devpath, mountpath, mntflags, arg, alen); |
151 | if (ukfs == NULL) | | 152 | if (ukfs == NULL) |
152 | return -1; | | 153 | return -1; |
153 | | | 154 | |
154 | PUFFSOP_INIT(pops); | | 155 | PUFFSOP_INIT(pops); |
155 | | | 156 | |
156 | PUFFSOP_SET(pops, p2k, fs, statvfs); | | 157 | PUFFSOP_SET(pops, p2k, fs, statvfs); |
157 | PUFFSOP_SET(pops, p2k, fs, unmount); | | 158 | PUFFSOP_SET(pops, p2k, fs, unmount); |
158 | PUFFSOP_SET(pops, p2k, fs, sync); | | 159 | PUFFSOP_SET(pops, p2k, fs, sync); |
159 | PUFFSOP_SET(pops, p2k, fs, fhtonode); | | 160 | PUFFSOP_SET(pops, p2k, fs, fhtonode); |
160 | PUFFSOP_SET(pops, p2k, fs, nodetofh); | | 161 | PUFFSOP_SET(pops, p2k, fs, nodetofh); |
161 | | | 162 | |
162 | PUFFSOP_SET(pops, p2k, node, lookup); | | 163 | PUFFSOP_SET(pops, p2k, node, lookup); |