| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: vfs_syscalls.c,v 1.414.4.1 2011/01/20 14:24:58 bouyer Exp $ */ | | 1 | /* $NetBSD: vfs_syscalls.c,v 1.414.4.2 2011/02/11 11:27:29 bouyer Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Andrew Doran. | | 8 | * by Andrew Doran. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -56,27 +56,27 @@ | | | @@ -56,27 +56,27 @@ |
56 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 56 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
57 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 57 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
58 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 58 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
59 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 59 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
60 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 60 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
61 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 61 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
62 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 62 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
63 | * SUCH DAMAGE. | | 63 | * SUCH DAMAGE. |
64 | * | | 64 | * |
65 | * @(#)vfs_syscalls.c 8.42 (Berkeley) 7/31/95 | | 65 | * @(#)vfs_syscalls.c 8.42 (Berkeley) 7/31/95 |
66 | */ | | 66 | */ |
67 | | | 67 | |
68 | #include <sys/cdefs.h> | | 68 | #include <sys/cdefs.h> |
69 | __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.414.4.1 2011/01/20 14:24:58 bouyer Exp $"); | | 69 | __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.414.4.2 2011/02/11 11:27:29 bouyer Exp $"); |
70 | | | 70 | |
71 | #ifdef _KERNEL_OPT | | 71 | #ifdef _KERNEL_OPT |
72 | #include "opt_fileassoc.h" | | 72 | #include "opt_fileassoc.h" |
73 | #include "veriexec.h" | | 73 | #include "veriexec.h" |
74 | #endif | | 74 | #endif |
75 | | | 75 | |
76 | #include <sys/param.h> | | 76 | #include <sys/param.h> |
77 | #include <sys/systm.h> | | 77 | #include <sys/systm.h> |
78 | #include <sys/namei.h> | | 78 | #include <sys/namei.h> |
79 | #include <sys/filedesc.h> | | 79 | #include <sys/filedesc.h> |
80 | #include <sys/kernel.h> | | 80 | #include <sys/kernel.h> |
81 | #include <sys/file.h> | | 81 | #include <sys/file.h> |
82 | #include <sys/stat.h> | | 82 | #include <sys/stat.h> |
| @@ -889,47 +889,41 @@ sys___quotactl50(struct lwp *l, const st | | | @@ -889,47 +889,41 @@ sys___quotactl50(struct lwp *l, const st |
889 | { | | 889 | { |
890 | /* { | | 890 | /* { |
891 | syscallarg(const char *) path; | | 891 | syscallarg(const char *) path; |
892 | syscallarg(struct plistref *) pref; | | 892 | syscallarg(struct plistref *) pref; |
893 | } */ | | 893 | } */ |
894 | struct mount *mp; | | 894 | struct mount *mp; |
895 | int error; | | 895 | int error; |
896 | struct vnode *vp; | | 896 | struct vnode *vp; |
897 | prop_dictionary_t dict; | | 897 | prop_dictionary_t dict; |
898 | struct plistref pref; | | 898 | struct plistref pref; |
899 | | | 899 | |
900 | error = namei_simple_user(SCARG(uap, path), | | 900 | error = namei_simple_user(SCARG(uap, path), |
901 | NSM_FOLLOW_TRYEMULROOT, &vp); | | 901 | NSM_FOLLOW_TRYEMULROOT, &vp); |
902 | printf("namei error %d\n", error); | | | |
903 | if (error != 0) | | 902 | if (error != 0) |
904 | return (error); | | 903 | return (error); |
905 | mp = vp->v_mount; | | 904 | mp = vp->v_mount; |
906 | error = copyin(SCARG(uap, pref), &pref, sizeof(pref)); | | 905 | error = copyin(SCARG(uap, pref), &pref, sizeof(pref)); |
907 | printf("copyin error %d\n", error); | | | |
908 | if (error) | | 906 | if (error) |
909 | return error; | | 907 | return error; |
910 | error = prop_dictionary_copyin(&pref, &dict); | | 908 | error = prop_dictionary_copyin(&pref, &dict); |
911 | printf("prop_dictionary_copyin error %d\n", error); | | | |
912 | if (error) | | 909 | if (error) |
913 | return error; | | 910 | return error; |
914 | error = VFS_QUOTACTL(mp, dict); | | 911 | error = VFS_QUOTACTL(mp, dict); |
915 | printf("VFS_QUOTACTL error %d\n", error); | | | |
916 | vrele(vp); | | 912 | vrele(vp); |
917 | if (!error) | | 913 | if (!error) |
918 | error = prop_dictionary_copyout(&pref, dict); | | 914 | error = prop_dictionary_copyout(&pref, dict); |
919 | printf("prop_dictionary_copyout error %d\n", error); | | | |
920 | if (!error) | | 915 | if (!error) |
921 | error = copyout(&pref, SCARG(uap, pref), sizeof(pref)); | | 916 | error = copyout(&pref, SCARG(uap, pref), sizeof(pref)); |
922 | printf("copyout error %d\n", error); | | | |
923 | prop_object_release(dict); | | 917 | prop_object_release(dict); |
924 | return (error); | | 918 | return (error); |
925 | } | | 919 | } |
926 | | | 920 | |
927 | int | | 921 | int |
928 | dostatvfs(struct mount *mp, struct statvfs *sp, struct lwp *l, int flags, | | 922 | dostatvfs(struct mount *mp, struct statvfs *sp, struct lwp *l, int flags, |
929 | int root) | | 923 | int root) |
930 | { | | 924 | { |
931 | struct cwdinfo *cwdi = l->l_proc->p_cwdi; | | 925 | struct cwdinfo *cwdi = l->l_proc->p_cwdi; |
932 | int error = 0; | | 926 | int error = 0; |
933 | | | 927 | |
934 | /* | | 928 | /* |
935 | * If MNT_NOWAIT or MNT_LAZY is specified, do not | | 929 | * If MNT_NOWAIT or MNT_LAZY is specified, do not |