| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: udf_subr.c,v 1.62 2008/07/18 14:18:51 reinoud Exp $ */ | | 1 | /* $NetBSD: udf_subr.c,v 1.63 2008/07/18 15:55:32 reinoud Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2006, 2008 Reinoud Zandijk | | 4 | * Copyright (c) 2006, 2008 Reinoud Zandijk |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -19,27 +19,27 @@ | | | @@ -19,27 +19,27 @@ |
19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | | 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | | 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | | 26 | * |
27 | */ | | 27 | */ |
28 | | | 28 | |
29 | | | 29 | |
30 | #include <sys/cdefs.h> | | 30 | #include <sys/cdefs.h> |
31 | #ifndef lint | | 31 | #ifndef lint |
32 | __KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.62 2008/07/18 14:18:51 reinoud Exp $"); | | 32 | __KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.63 2008/07/18 15:55:32 reinoud Exp $"); |
33 | #endif /* not lint */ | | 33 | #endif /* not lint */ |
34 | | | 34 | |
35 | | | 35 | |
36 | #if defined(_KERNEL_OPT) | | 36 | #if defined(_KERNEL_OPT) |
37 | #include "opt_quota.h" | | 37 | #include "opt_quota.h" |
38 | #include "opt_compat_netbsd.h" | | 38 | #include "opt_compat_netbsd.h" |
39 | #endif | | 39 | #endif |
40 | | | 40 | |
41 | #include <sys/param.h> | | 41 | #include <sys/param.h> |
42 | #include <sys/systm.h> | | 42 | #include <sys/systm.h> |
43 | #include <sys/sysctl.h> | | 43 | #include <sys/sysctl.h> |
44 | #include <sys/namei.h> | | 44 | #include <sys/namei.h> |
45 | #include <sys/proc.h> | | 45 | #include <sys/proc.h> |
| @@ -3389,27 +3389,27 @@ udf_close_logvol(struct udf_mount *ump, | | | @@ -3389,27 +3389,27 @@ udf_close_logvol(struct udf_mount *ump, |
3389 | * set update/modify flags etc. | | 3389 | * set update/modify flags etc. |
3390 | * } | | 3390 | * } |
3391 | */ | | 3391 | */ |
3392 | | | 3392 | |
3393 | /* | | 3393 | /* |
3394 | * Genfs interface. These four functions are the only ones defined though not | | 3394 | * Genfs interface. These four functions are the only ones defined though not |
3395 | * documented... great.... | | 3395 | * documented... great.... |
3396 | */ | | 3396 | */ |
3397 | | | 3397 | |
3398 | /* | | 3398 | /* |
3399 | * Callback from genfs to allocate len bytes at offset off; only called when | | 3399 | * Callback from genfs to allocate len bytes at offset off; only called when |
3400 | * filling up gaps in the allocation. | | 3400 | * filling up gaps in the allocation. |
3401 | */ | | 3401 | */ |
3402 | /* XXX should be check if there is space enough in udf_gop_alloc? */ | | 3402 | /* XXX should we check if there is space enough in udf_gop_alloc? */ |
3403 | static int | | 3403 | static int |
3404 | udf_gop_alloc(struct vnode *vp, off_t off, | | 3404 | udf_gop_alloc(struct vnode *vp, off_t off, |
3405 | off_t len, int flags, kauth_cred_t cred) | | 3405 | off_t len, int flags, kauth_cred_t cred) |
3406 | { | | 3406 | { |
3407 | #if 0 | | 3407 | #if 0 |
3408 | struct udf_node *udf_node = VTOI(vp); | | 3408 | struct udf_node *udf_node = VTOI(vp); |
3409 | struct udf_mount *ump = udf_node->ump; | | 3409 | struct udf_mount *ump = udf_node->ump; |
3410 | uint32_t lb_size, num_lb; | | 3410 | uint32_t lb_size, num_lb; |
3411 | #endif | | 3411 | #endif |
3412 | | | 3412 | |
3413 | DPRINTF(NOTIMPL, ("udf_gop_alloc not implemented\n")); | | 3413 | DPRINTF(NOTIMPL, ("udf_gop_alloc not implemented\n")); |
3414 | DPRINTF(ALLOC, ("udf_gop_alloc called for %"PRIu64" bytes\n", len)); | | 3414 | DPRINTF(ALLOC, ("udf_gop_alloc called for %"PRIu64" bytes\n", len)); |
3415 | | | 3415 | |