Wed Feb 9 16:09:55 2011 UTC ()
Proper definitions for quotactl


(bouyer)
diff -r1.168.4.1 -r1.168.4.2 src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -r1.84.6.1 -r1.84.6.2 src/sys/compat/netbsd32/syscalls.master

cvs diff -r1.168.4.1 -r1.168.4.2 src/sys/compat/netbsd32/netbsd32_netbsd.c (expand / switch to unified diff)

--- src/sys/compat/netbsd32/netbsd32_netbsd.c 2011/01/20 14:24:55 1.168.4.1
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c 2011/02/09 16:09:55 1.168.4.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: netbsd32_netbsd.c,v 1.168.4.1 2011/01/20 14:24:55 bouyer Exp $ */ 1/* $NetBSD: netbsd32_netbsd.c,v 1.168.4.2 2011/02/09 16:09:55 bouyer Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998, 2001, 2008 Matthew R. Green 4 * Copyright (c) 1998, 2001, 2008 Matthew R. Green
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.
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
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, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.168.4.1 2011/01/20 14:24:55 bouyer Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.168.4.2 2011/02/09 16:09:55 bouyer Exp $");
31 31
32#if defined(_KERNEL_OPT) 32#if defined(_KERNEL_OPT)
33#include "opt_ddb.h" 33#include "opt_ddb.h"
34#include "opt_ntp.h" 34#include "opt_ntp.h"
35#include "opt_compat_netbsd.h" 35#include "opt_compat_netbsd.h"
36#include "opt_compat_43.h" 36#include "opt_compat_43.h"
37#include "opt_sysv.h" 37#include "opt_sysv.h"
38#include "opt_syscall_debug.h" 38#include "opt_syscall_debug.h"
39#include "opt_sa.h" 39#include "opt_sa.h"
40#endif 40#endif
41 41
42/* 42/*
43 * Though COMPAT_OLDSOCK is needed only for COMPAT_43, SunOS, Linux, 43 * Though COMPAT_OLDSOCK is needed only for COMPAT_43, SunOS, Linux,
@@ -1175,51 +1175,51 @@ netbsd32_mkdir(struct lwp *l, const stru @@ -1175,51 +1175,51 @@ netbsd32_mkdir(struct lwp *l, const stru
1175int 1175int
1176netbsd32_rmdir(struct lwp *l, const struct netbsd32_rmdir_args *uap, register_t *retval) 1176netbsd32_rmdir(struct lwp *l, const struct netbsd32_rmdir_args *uap, register_t *retval)
1177{ 1177{
1178 /* { 1178 /* {
1179 syscallarg(const netbsd32_charp) path; 1179 syscallarg(const netbsd32_charp) path;
1180 } */ 1180 } */
1181 struct sys_rmdir_args ua; 1181 struct sys_rmdir_args ua;
1182 1182
1183 NETBSD32TOP_UAP(path, const char); 1183 NETBSD32TOP_UAP(path, const char);
1184 return (sys_rmdir(l, &ua, retval)); 1184 return (sys_rmdir(l, &ua, retval));
1185} 1185}
1186 1186
1187int 1187int
1188netbsd32_quotactl50(struct lwp *l, const struct netbsd32_quotactl_args *uap, register_t *retval) 1188compat_50_netbsd32_quotactl(struct lwp *l, const struct compat_50_netbsd32_quotactl_args *uap, register_t *retval)
1189{ 1189{
1190 /* { 1190 /* {
1191 syscallarg(const netbsd32_charp) path; 1191 syscallarg(const netbsd32_charp) path;
1192 syscallarg(int) cmd; 1192 syscallarg(int) cmd;
1193 syscallarg(int) uid; 1193 syscallarg(int) uid;
1194 syscallarg(netbsd32_voidp) arg; 1194 syscallarg(netbsd32_voidp) arg;
1195 } */ 1195 } */
1196 struct sys_quotactl_args ua; 1196 struct compat_50_sys_quotactl_args ua;
1197 1197
1198 NETBSD32TOP_UAP(path, const char); 1198 NETBSD32TOP_UAP(path, const char);
1199 NETBSD32TO64_UAP(cmd); 1199 NETBSD32TO64_UAP(cmd);
1200 NETBSD32TO64_UAP(uid); 1200 NETBSD32TO64_UAP(uid);
1201 NETBSD32TOP_UAP(arg, void *); 1201 NETBSD32TOP_UAP(arg, void *);
1202 return (sys_quotactl50(l, &ua, retval)); 1202 return (compat_50_sys_quotactl(l, &ua, retval));
1203} 1203}
1204 1204
1205int 1205int
1206netbsd32_quotactl(struct lwp *l, const struct netbsd32_quotactl_args *uap, register_t *retval) 1206netbsd32___quotactl50(struct lwp *l, const struct netbsd32___quotactl50_args *uap, register_t *retval)
1207{ 1207{
1208 /* { 1208 /* {
1209 syscallarg(const netbsd32_charp) path; 1209 syscallarg(const netbsd32_charp) path;
1210 syscallarg(void *) v; 1210 syscallarg(void *) v;
1211 } */ 1211 } */
1212 struct sys_quotactl_args ua; 1212 //struct sys___quotactl50_args ua;
1213 1213
1214 return EOPNOTSUPP; 1214 return EOPNOTSUPP;
1215#if 0 1215#if 0
1216 NETBSD32TOP_UAP(path, const char); 1216 NETBSD32TOP_UAP(path, const char);
1217 NETBSD32TO64_UAP(cmd); 1217 NETBSD32TO64_UAP(cmd);
1218 NETBSD32TO64_UAP(uid); 1218 NETBSD32TO64_UAP(uid);
1219 NETBSD32TOP_UAP(arg, void *); 1219 NETBSD32TOP_UAP(arg, void *);
1220 return (sys_quotactl(l, &ua, retval)); 1220 return (sys_quotactl(l, &ua, retval));
1221#endif 1221#endif
1222} 1222}
1223 1223
1224int 1224int
1225netbsd32___getfh30(struct lwp *l, const struct netbsd32___getfh30_args *uap, register_t *retval) 1225netbsd32___getfh30(struct lwp *l, const struct netbsd32___getfh30_args *uap, register_t *retval)

cvs diff -r1.84.6.1 -r1.84.6.2 src/sys/compat/netbsd32/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/netbsd32/syscalls.master 2011/01/20 14:24:56 1.84.6.1
+++ src/sys/compat/netbsd32/syscalls.master 2011/02/09 16:09:55 1.84.6.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.84.6.1 2011/01/20 14:24:56 bouyer Exp $ 1 $NetBSD: syscalls.master,v 1.84.6.2 2011/02/09 16:09:55 bouyer Exp $
2 2
3; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp 3; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
4; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 4; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
5 5
6; NetBSD system call name/number "master" file. 6; NetBSD system call name/number "master" file.
7; (See syscalls.conf to see what it is processed into.) 7; (See syscalls.conf to see what it is processed into.)
8; 8;
9; Fields: number type [type-dependent ...] 9; Fields: number type [type-dependent ...]
10; number system call number, must be in order 10; number system call number, must be in order
11; type one of STD, OBSOL, UNIMPL, IGNORED, NODEF, NOARGS, or one of 11; type one of STD, OBSOL, UNIMPL, IGNORED, NODEF, NOARGS, or one of
12; the compatibility options defined in syscalls.conf. 12; the compatibility options defined in syscalls.conf.
13; 13;
14; types: 14; types:
@@ -294,27 +294,27 @@ @@ -294,27 +294,27 @@
294139 OBSOL 4.2 sigreturn 294139 OBSOL 4.2 sigreturn
295140 COMPAT_50 { int|netbsd32||adjtime(netbsd32_timeval50p_t delta, \ 295140 COMPAT_50 { int|netbsd32||adjtime(netbsd32_timeval50p_t delta, \
296 netbsd32_timeval50p_t olddelta); } 296 netbsd32_timeval50p_t olddelta); }
297141 COMPAT_43 { int|netbsd32||ogetpeername(int fdes, \ 297141 COMPAT_43 { int|netbsd32||ogetpeername(int fdes, \
298 netbsd32_voidp asa, netbsd32_intp alen); } 298 netbsd32_voidp asa, netbsd32_intp alen); }
299142 COMPAT_43 { int32_t|sys||gethostid(void); } ogethostid 299142 COMPAT_43 { int32_t|sys||gethostid(void); } ogethostid
300143 COMPAT_43 { int|netbsd32||sethostid(int32_t hostid); } 300143 COMPAT_43 { int|netbsd32||sethostid(int32_t hostid); }
301144 COMPAT_43 { int|netbsd32||ogetrlimit(int which, \ 301144 COMPAT_43 { int|netbsd32||ogetrlimit(int which, \
302 netbsd32_orlimitp_t rlp); } 302 netbsd32_orlimitp_t rlp); }
303145 COMPAT_43 { int|netbsd32||osetrlimit(int which, \ 303145 COMPAT_43 { int|netbsd32||osetrlimit(int which, \
304 netbsd32_orlimitp_t rlp); } 304 netbsd32_orlimitp_t rlp); }
305146 COMPAT_43 { int|netbsd32||killpg(int pgid, int signum); } 305146 COMPAT_43 { int|netbsd32||killpg(int pgid, int signum); }
306147 NOARGS { int|sys||setsid(void); } 306147 NOARGS { int|sys||setsid(void); }
307148 COMPAT_50 { int|netbsd32||quotactl50(netbsd32_charp path, int cmd, \ 307148 COMPAT_50 { int|netbsd32||quotactl(netbsd32_charp path, int cmd, \
308 int uid, netbsd32_voidp arg); } 308 int uid, netbsd32_voidp arg); }
309149 COMPAT_43 { int|sys||quota(void); } oquota 309149 COMPAT_43 { int|sys||quota(void); } oquota
310150 COMPAT_43 { int|netbsd32||ogetsockname(int fdec, \ 310150 COMPAT_43 { int|netbsd32||ogetsockname(int fdec, \
311 netbsd32_voidp asa, netbsd32_intp alen); } 311 netbsd32_voidp asa, netbsd32_intp alen); }
312 312
313; Syscalls 151-180 inclusive are reserved for vendor-specific 313; Syscalls 151-180 inclusive are reserved for vendor-specific
314; system calls. (This includes various calls added for compatibity 314; system calls. (This includes various calls added for compatibity
315; with other Unix variants.) 315; with other Unix variants.)
316; Some of these calls are now supported by BSD... 316; Some of these calls are now supported by BSD...
317151 UNIMPL 317151 UNIMPL
318152 UNIMPL 318152 UNIMPL
319153 UNIMPL 319153 UNIMPL
320154 UNIMPL 320154 UNIMPL
@@ -959,15 +959,15 @@ @@ -959,15 +959,15 @@
959#if defined(NTP) || !defined(_KERNEL_OPT) 959#if defined(NTP) || !defined(_KERNEL_OPT)
960448 STD { int|netbsd32|50|ntp_gettime( \ 960448 STD { int|netbsd32|50|ntp_gettime( \
961 netbsd32_ntptimevalp_t ntvp); } 961 netbsd32_ntptimevalp_t ntvp); }
962#else 962#else
963448 EXCL ___ntp_gettime50 963448 EXCL ___ntp_gettime50
964#endif 964#endif
965449 STD { int|netbsd32|50|wait4(int pid, \ 965449 STD { int|netbsd32|50|wait4(int pid, \
966 netbsd32_intp status, \ 966 netbsd32_intp status, \
967 int options, netbsd32_rusagep_t rusage); } 967 int options, netbsd32_rusagep_t rusage); }
968450 STD { int|netbsd32|50|mknod(const netbsd32_charp path, \ 968450 STD { int|netbsd32|50|mknod(const netbsd32_charp path, \
969 mode_t mode, netbsd32_dev_t dev); } 969 mode_t mode, netbsd32_dev_t dev); }
970451 STD { int|netbsd32|50|fhstat(const netbsd32_voidp fhp, \ 970451 STD { int|netbsd32|50|fhstat(const netbsd32_voidp fhp, \
971 netbsd32_size_t fh_size, netbsd32_statp_t sb); } 971 netbsd32_size_t fh_size, netbsd32_statp_t sb); }
972452 STD { int|sys||quotactl(const char *path, \ 972452 STD { int|netbsd32|50|quotactl(const netbsd32_charp path, \
973 netbsd32_voidp pref); } 973 netbsd32_voidp pref); }