2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include "afs/param.h"
13 #ifdef IGNORE_SOME_GCC_WARNINGS
14 # pragma GCC diagnostic warning "-Wold-style-definition"
15 # pragma GCC diagnostic warning "-Wstrict-prototypes"
18 #include "afs/sysincludes.h" /* Standard vendor system headers */
19 #include "afsincludes.h" /* Afs-based standard headers */
20 #include "afs/afs_stats.h"
21 #include "rx/rx_globals.h"
22 #if !defined(UKERNEL) && !defined(AFS_LINUX20_ENV)
25 #include "h/hashing.h"
27 #if !defined(AFS_HPUX110_ENV) && !defined(AFS_DARWIN_ENV)
28 #include "netinet/in_var.h"
30 #endif /* !defined(UKERNEL) */
32 #if (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) || defined(AFS_HPUX_64BIT_ENV) || defined(AFS_SUN5_64BIT_ENV) || (defined(AFS_SGI_ENV) && (_MIPS_SZLONG==64)) || defined(NEED_IOCTL32)
34 afs_ioctl32_to_afs_ioctl(const struct afs_ioctl32
*src
, struct afs_ioctl
*dst
)
36 #ifdef AFS_DARWIN100_ENV
37 dst
->in
= CAST_USER_ADDR_T(src
->in
);
38 dst
->out
= CAST_USER_ADDR_T(src
->out
);
40 dst
->in
= (char *)(unsigned long)src
->in
;
41 dst
->out
= (char *)(unsigned long)src
->out
;
43 dst
->in_size
= src
->in_size
;
44 dst
->out_size
= src
->out_size
;
49 * If you need to change copyin_afs_ioctl(), you may also need to change
54 #ifdef AFS_DARWIN100_ENV
55 copyin_afs_ioctl(user_addr_t cmarg
, struct afs_ioctl
*dst
)
57 copyin_afs_ioctl(caddr_t cmarg
, struct afs_ioctl
*dst
)
61 #if defined(AFS_DARWIN100_ENV)
62 struct afs_ioctl32 dst32
;
64 if (!proc_is64bit(current_proc())) {
65 AFS_COPYIN(cmarg
, (caddr_t
) & dst32
, sizeof dst32
, code
);
67 afs_ioctl32_to_afs_ioctl(&dst32
, dst
);
71 #if defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)
72 struct afs_ioctl32 dst32
;
75 AFS_COPYIN(cmarg
, (caddr_t
) & dst32
, sizeof dst32
, code
);
77 afs_ioctl32_to_afs_ioctl(&dst32
, dst
);
80 #endif /* defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) */
83 #if defined(AFS_HPUX_64BIT_ENV)
84 struct afs_ioctl32 dst32
;
86 if (is_32bit(u
.u_procp
)) { /* is_32bit() in proc_iface.h */
87 AFS_COPYIN(cmarg
, (caddr_t
) & dst32
, sizeof dst32
, code
);
89 afs_ioctl32_to_afs_ioctl(&dst32
, dst
);
92 #endif /* defined(AFS_HPUX_64BIT_ENV) */
94 #if defined(AFS_SUN5_64BIT_ENV)
95 struct afs_ioctl32 dst32
;
97 if (get_udatamodel() == DATAMODEL_ILP32
) {
98 AFS_COPYIN(cmarg
, (caddr_t
) & dst32
, sizeof dst32
, code
);
100 afs_ioctl32_to_afs_ioctl(&dst32
, dst
);
103 #endif /* defined(AFS_SUN5_64BIT_ENV) */
105 #if defined(AFS_SGI_ENV) && (_MIPS_SZLONG==64)
106 struct afs_ioctl32 dst32
;
108 if (!ABI_IS_64BIT(get_current_abi())) {
109 AFS_COPYIN(cmarg
, (caddr_t
) & dst32
, sizeof dst32
, code
);
111 afs_ioctl32_to_afs_ioctl(&dst32
, dst
);
114 #endif /* defined(AFS_SGI_ENV) && (_MIPS_SZLONG==64) */
116 #if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)
117 struct afs_ioctl32 dst32
;
119 #ifdef AFS_SPARC64_LINUX26_ENV
120 if (test_thread_flag(TIF_32BIT
))
121 #elif defined(AFS_SPARC64_LINUX24_ENV)
122 if (current
->thread
.flags
& SPARC_FLAG_32BIT
)
123 #elif defined(AFS_SPARC64_LINUX20_ENV)
124 if (current
->tss
.flags
& SPARC_FLAG_32BIT
)
126 #elif defined(AFS_AMD64_LINUX26_ENV)
127 if (test_thread_flag(TIF_IA32
))
128 #elif defined(AFS_AMD64_LINUX20_ENV)
129 if (current
->thread
.flags
& THREAD_IA32
)
131 #elif defined(AFS_PPC64_LINUX26_ENV)
132 #if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
133 if (current
->thread_info
->flags
& _TIF_32BIT
)
135 if (task_thread_info(current
)->flags
& _TIF_32BIT
)
137 #elif defined(AFS_PPC64_LINUX20_ENV)
138 if (current
->thread
.flags
& PPC_FLAG_32BIT
)
140 #elif defined(AFS_S390X_LINUX26_ENV)
141 if (test_thread_flag(TIF_31BIT
))
142 #elif defined(AFS_S390X_LINUX20_ENV)
143 if (current
->thread
.flags
& S390_FLAG_31BIT
)
146 #error pioctl32 not done for this linux
149 AFS_COPYIN(cmarg
, (caddr_t
) & dst32
, sizeof dst32
, code
);
151 afs_ioctl32_to_afs_ioctl(&dst32
, dst
);
154 #endif /* defined(AFS_LINUX_64BIT_KERNEL) */
156 AFS_COPYIN(cmarg
, (caddr_t
) dst
, sizeof *dst
, code
);
163 #include "sys/lockl.h"
166 * syscall - this is the VRMIX system call entry point.
169 * THIS SHOULD BE CHANGED TO afs_syscall(), but requires
170 * all the user-level calls to `syscall' to change.
172 syscall(syscall
, p1
, p2
, p3
, p4
, p5
, p6
)
177 #ifndef AFS_AIX41_ENV
178 extern lock_t kernel_lock
;
179 monster
= lockl(&kernel_lock
, LOCK_SHORT
);
180 #endif /* !AFS_AIX41_ENV */
182 AFS_STATCNT(syscall
);
186 rval1
= afs_syscall_call(p1
, p2
, p3
, p4
, p5
, p6
);
191 rval1
= afs_setpag();
197 rval1
= afs_syscall_pioctl(p1
, p2
, p3
, p4
);
201 case AFSCALL_ICREATE
:
202 rval1
= afs_syscall_icreate(p1
, p2
, p3
, p4
, p5
, p6
);
206 rval1
= afs_syscall_iopen(p1
, p2
, p3
);
210 rval1
= afs_syscall_iincdec(p1
, p2
, p3
, -1);
214 rval1
= afs_syscall_iincdec(p1
, p2
, p3
, 1);
219 code
= Afscall_icl(p1
, p2
, p3
, p4
, p5
, &retval
);
234 #ifndef AFS_AIX41_ENV
235 if (monster
!= LOCK_NEST
)
236 unlockl(&kernel_lock
);
237 #endif /* !AFS_AIX41_ENV */
238 return getuerror()? -1 : rval1
;
242 * lsetpag - interface to afs_setpag().
248 AFS_STATCNT(lsetpag
);
249 return syscall(AFSCALL_SETPAG
, 0, 0, 0, 0, 0);
253 * lpioctl - interface to pioctl()
256 lpioctl(char *path
, int cmd
, void *cmarg
, int follow
)
259 AFS_STATCNT(lpioctl
);
260 return syscall(AFSCALL_PIOCTL
, path
, cmd
, cmarg
, follow
);
263 #else /* !AFS_AIX32_ENV */
265 #if defined(AFS_SGI_ENV)
277 Afs_syscall(struct afsargs
*uap
, rval_t
* rvp
)
282 AFS_STATCNT(afs_syscall
);
283 switch (uap
->syscall
) {
288 Afscall_icl(uap
->parm1
, uap
->parm2
, uap
->parm3
, uap
->parm4
,
289 uap
->parm5
, &retval
);
291 rvp
->r_val1
= retval
;
293 #ifdef AFS_SGI_XFS_IOPS_ENV
296 afs_syscall_idec64(uap
->parm1
, uap
->parm2
, uap
->parm3
, uap
->parm4
,
301 afs_syscall_iinc64(uap
->parm1
, uap
->parm2
, uap
->parm3
, uap
->parm4
,
304 case AFSCALL_ILISTINODE64
:
306 afs_syscall_ilistinode64(uap
->parm1
, uap
->parm2
, uap
->parm3
,
307 uap
->parm4
, uap
->parm5
);
309 case AFSCALL_ICREATENAME64
:
311 afs_syscall_icreatename64(uap
->parm1
, uap
->parm2
, uap
->parm3
,
312 uap
->parm4
, uap
->parm5
);
315 #ifdef AFS_SGI_VNODE_GLUE
316 case AFSCALL_INIT_KERNEL_CONFIG
:
317 error
= afs_init_kernel_config(uap
->parm1
);
322 afs_syscall_call(uap
->syscall
, uap
->parm1
, uap
->parm2
, uap
->parm3
,
323 uap
->parm4
, uap
->parm5
);
328 #else /* AFS_SGI_ENV */
345 #if defined(AFS_HPUX_64BIT_ENV) || defined(AFS_SUN5_64BIT_ENV) || (defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)) || defined(NEED_IOCTL32)
347 iparam32_to_iparam(const struct iparam32
*src
, struct iparam
*dst
)
349 dst
->param1
= (iparmtype
)(uintptrsz
)src
->param1
;
350 dst
->param2
= (iparmtype
)(uintptrsz
)src
->param2
;
351 dst
->param3
= (iparmtype
)(uintptrsz
)src
->param3
;
352 dst
->param4
= (iparmtype
)(uintptrsz
)src
->param4
;
357 * If you need to change copyin_iparam(), you may also need to change
358 * copyin_afs_ioctl().
360 * This function is needed only for icreate, meaning, only on platforms
361 * providing the inode fileserver.
365 copyin_iparam(caddr_t cmarg
, struct iparam
*dst
)
369 #if defined(AFS_HPUX_64BIT_ENV)
370 struct iparam32 dst32
;
372 if (is_32bit(u
.u_procp
)) { /* is_32bit() in proc_iface.h */
373 AFS_COPYIN(cmarg
, (caddr_t
) & dst32
, sizeof dst32
, code
);
375 iparam32_to_iparam(&dst32
, dst
);
378 #endif /* AFS_HPUX_64BIT_ENV */
380 #if defined(AFS_SUN5_64BIT_ENV)
381 struct iparam32 dst32
;
383 if (get_udatamodel() == DATAMODEL_ILP32
) {
384 AFS_COPYIN(cmarg
, (caddr_t
) & dst32
, sizeof dst32
, code
);
386 iparam32_to_iparam(&dst32
, dst
);
389 #endif /* AFS_SUN5_64BIT_ENV */
391 #if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)
392 struct iparam32 dst32
;
394 #ifdef AFS_SPARC64_LINUX26_ENV
395 if (test_thread_flag(TIF_32BIT
))
396 #elif defined(AFS_SPARC64_LINUX24_ENV)
397 if (current
->thread
.flags
& SPARC_FLAG_32BIT
)
398 #elif defined(AFS_SPARC64_LINUX20_ENV)
399 if (current
->tss
.flags
& SPARC_FLAG_32BIT
)
401 #elif defined(AFS_AMD64_LINUX26_ENV)
402 if (test_thread_flag(TIF_IA32
))
403 #elif defined(AFS_AMD64_LINUX20_ENV)
404 if (current
->thread
.flags
& THREAD_IA32
)
406 #elif defined(AFS_PPC64_LINUX26_ENV)
407 #if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
408 if (current
->thread_info
->flags
& _TIF_32BIT
)
410 if (task_thread_info(current
)->flags
& _TIF_32BIT
)
412 #elif defined(AFS_PPC64_LINUX20_ENV)
413 if (current
->thread
.flags
& PPC_FLAG_32BIT
)
415 #elif defined(AFS_S390X_LINUX26_ENV)
416 if (test_thread_flag(TIF_31BIT
))
417 #elif defined(AFS_S390X_LINUX20_ENV)
418 if (current
->thread
.flags
& S390_FLAG_31BIT
)
421 #error iparam32 not done for this linux platform
424 AFS_COPYIN(cmarg
, (caddr_t
) & dst32
, sizeof dst32
, code
);
426 iparam32_to_iparam(&dst32
, dst
);
429 #endif /* AFS_LINUX_64BIT_KERNEL */
431 AFS_COPYIN(cmarg
, (caddr_t
) dst
, sizeof *dst
, code
);
435 /* Main entry of all afs system calls */
437 extern int afs_sinited
;
439 Afs_syscall(struct afssysa
*uap
, rval_t
* rvp
)
441 int *retval
= &rvp
->r_val1
;
442 #elif defined(AFS_DARWIN100_ENV)
462 afs3_syscall(afs_proc_t
*p
, void *args
, unsigned int *retval
)
464 struct afssysa64
*uap64
= NULL
;
465 struct afssysa
*uap
= NULL
;
466 #elif defined(AFS_FBSD_ENV)
468 afs3_syscall(struct thread
*p
, void *args
)
478 } *uap
= (struct a
*)args
;
480 long *retval
= &fbsd_ret
;
481 #elif defined(AFS_NBSD40_ENV)
483 afs3_syscall(struct lwp
*p
, const void *args
, register_t
*retval
)
485 /* see osi_machdep.h */
486 struct afs_sysargs
*uap
= (struct afs_sysargs
*) args
;
487 #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
489 afs3_syscall(afs_proc_t
*p
, void *args
, long *retval
)
499 } *uap
= (struct a
*)args
;
500 #elif defined(AFS_LINUX20_ENV)
508 long parm6
; /* not actually used - should be removed */
510 /* Linux system calls only set up for 5 arguments. */
512 afs_syscall(long syscall
, long parm1
, long parm2
, long parm3
, long parm4
)
514 struct afssysargs args
, *uap
= &args
;
516 long *retval
= &linux_ret
;
517 long eparm
[4]; /* matches AFSCALL_ICL in fstrace.c */
518 # ifdef AFS_SPARC64_LINUX24_ENV
519 afs_int32 eparm32
[4];
521 /* eparm is also used by AFSCALL_CALL in afsd.c */
523 # if defined(UKERNEL)
535 } *uap
= (struct a
*)get_user_struct()->u_ap
;
548 } *uap
= (struct a
*)u
.u_ap
;
549 # endif /* UKERNEL */
550 # if defined(AFS_HPUX_ENV)
551 long *retval
= &u
.u_rval1
;
552 # elif defined(UKERNEL)
553 int *retval
= &(get_user_struct()->u_rval1
);
555 int *retval
= &u
.u_rval1
;
560 AFS_STATCNT(afs_syscall
);
567 #ifdef AFS_LINUX20_ENV
568 /* setup uap for use below - pull out the magic decoder ring to know
569 * which syscalls have folded argument lists.
571 uap
->syscall
= syscall
;
575 if (syscall
== AFSCALL_ICL
|| syscall
== AFSCALL_CALL
) {
576 #ifdef AFS_SPARC64_LINUX24_ENV
577 /* from arch/sparc64/kernel/sys_sparc32.c */
579 ({ unsigned long __ret; \
580 __asm__ ("srl %0, 0, %0" \
587 #ifdef AFS_SPARC64_LINUX26_ENV
588 if (test_thread_flag(TIF_32BIT
))
590 if (current
->thread
.flags
& SPARC_FLAG_32BIT
)
593 AFS_COPYIN((char *)parm4
, (char *)eparm32
, sizeof(eparm32
), code
);
594 eparm
[0] = AA(eparm32
[0]);
595 eparm
[1] = AA(eparm32
[1]);
596 eparm
[2] = AA(eparm32
[2]);
600 AFS_COPYIN((char *)parm4
, (char *)eparm
, sizeof(eparm
), code
);
601 uap
->parm4
= eparm
[0];
602 uap
->parm5
= eparm
[1];
603 uap
->parm6
= eparm
[2];
610 #if defined(AFS_DARWIN80_ENV)
612 osi_Assert(*retval
== 0);
613 #ifdef AFS_DARWIN100_ENV
614 if (proc_is64bit(p
)) {
615 uap64
= (struct afssysa64
*)args
;
616 if (uap64
->syscall
== AFSCALL_CALL
) {
618 afs_syscall64_call(uap64
->parm1
, uap64
->parm2
, uap64
->parm3
,
619 uap64
->parm4
, uap64
->parm5
, uap64
->parm6
);
620 /* pass back the code as syscall retval */
625 } else if (uap64
->syscall
== AFSCALL_SETPAG
) {
627 code
= afs_setpag(p
, args
, retval
);
629 } else if (uap64
->syscall
== AFSCALL_PIOCTL
) {
632 afs_syscall64_pioctl(uap64
->parm1
, (unsigned int)uap64
->parm2
,
633 uap64
->parm3
, (int)uap64
->parm4
,
636 } else if (uap64
->syscall
== AFSCALL_ICL
) {
639 Afscall64_icl(uap64
->parm1
, uap64
->parm2
, uap64
->parm3
,
640 uap64
->parm4
, uap64
->parm5
, retval
);
644 if (uap64
->syscall
!= AFSCALL_CALL
)
646 } else { /* and the default case for 32 bit procs */
648 uap
= (struct afssysa
*)args
;
650 #if defined(AFS_HPUX_ENV)
652 * There used to be code here (duplicated from osi_Init()) for
653 * initializing the semaphore used by AFS_GLOCK(). Was the
654 * duplication to handle the case of a dynamically loaded kernel
660 #if defined(AFS_NBSD40_ENV)
661 if (SCARG(uap
, syscall
) == AFSCALL_CALL
) {
663 afs_syscall_call(SCARG(uap
, parm1
), SCARG(uap
, parm2
),
664 SCARG(uap
, parm3
), SCARG(uap
, parm4
),
665 SCARG(uap
, parm5
), SCARG(uap
, parm6
));
666 } else if (SCARG(uap
, syscall
) == AFSCALL_SETPAG
) {
668 if (uap
->syscall
== AFSCALL_CALL
) {
670 afs_syscall_call(uap
->parm1
, uap
->parm2
, uap
->parm3
,
671 uap
->parm4
, uap
->parm5
, uap
->parm6
);
672 #ifdef AFS_DARWIN_ENV
673 /* pass back the code as syscall retval */
679 } else if (uap
->syscall
== AFSCALL_SETPAG
) {
684 procp
= ttoproc(curthread
);
686 code
= afs_setpag(&procp
->p_cred
);
690 #if defined(AFS_FBSD_ENV)
691 code
= afs_setpag(p
, args
);
692 #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
693 code
= afs_setpag(p
, args
, retval
);
694 #else /* AFS_DARWIN_ENV || AFS_XBSD_ENV */
700 #if defined(AFS_NBSD40_ENV)
701 (SCARG(uap
, syscall
) == AFSCALL_PIOCTL
) {
703 (uap
->syscall
== AFSCALL_PIOCTL
) {
706 #if defined(AFS_SUN5_ENV)
708 afs_syscall_pioctl(uap
->parm1
, uap
->parm2
, uap
->parm3
,
709 uap
->parm4
, rvp
, CRED());
710 #elif defined(AFS_FBSD_ENV)
712 afs_syscall_pioctl((void *)uap
->parm1
, uap
->parm2
, (void *)uap
->parm3
,
713 uap
->parm4
, p
->td_ucred
);
714 #elif defined(AFS_DARWIN80_ENV)
716 afs_syscall_pioctl(uap
->parm1
, uap
->parm2
, uap
->parm3
,
717 uap
->parm4
, kauth_cred_get());
718 #elif defined(AFS_NBSD40_ENV)
720 afs_syscall_pioctl((char *)SCARG(uap
, parm1
), SCARG(uap
, parm2
),
721 (void *)SCARG(uap
, parm3
), SCARG(uap
, parm4
),
723 #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
725 afs_syscall_pioctl(uap
->parm1
, uap
->parm2
, uap
->parm3
,
726 uap
->parm4
, p
->p_cred
->pc_ucred
);
729 afs_syscall_pioctl((char *)uap
->parm1
,
730 (unsigned int)uap
->parm2
,
736 #ifdef AFS_NBSD40_ENV
737 } else if (SCARG(uap
, syscall
) == AFSCALL_ICREATE
) {
738 struct iparam iparams
;
739 code
= copyin_iparam((char *) SCARG(uap
, parm3
), &iparams
);
741 } else if (uap
->syscall
== AFSCALL_ICREATE
) {
742 struct iparam iparams
;
744 code
= copyin_iparam((char *)uap
->parm3
, &iparams
);
747 #if defined(KERNEL_HAVE_UERROR)
751 #if defined(AFS_SUN5_ENV)
753 afs_syscall_icreate(uap
->parm1
, uap
->parm2
, iparams
.param1
,
754 iparams
.param2
, iparams
.param3
,
755 iparams
.param4
, rvp
, CRED());
756 #elif defined(AFS_NBSD40_ENV)
758 afs_syscall_icreate(SCARG(uap
, parm1
), SCARG(uap
, parm2
),
759 iparams
.param1
, iparams
.param2
, iparams
.param3
,
760 iparams
.param4
, retval
764 afs_syscall_icreate(uap
->parm1
, uap
->parm2
, iparams
.param1
,
765 iparams
.param2
, iparams
.param3
,
767 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
771 #endif /* AFS_SUN5_ENV */
773 #if defined(AFS_NBSD40_ENV)
774 } else if (SCARG(uap
, syscall
) == AFSCALL_IOPEN
) {
776 } else if (uap
->syscall
== AFSCALL_IOPEN
) {
777 #endif /* !AFS_NBSD40_ENV */
778 #if defined(AFS_SUN5_ENV)
780 afs_syscall_iopen(uap
->parm1
, uap
->parm2
, uap
->parm3
, rvp
,
782 #elif defined(AFS_NBSD40_ENV)
783 code
= afs_syscall_iopen(SCARG(uap
, parm1
), SCARG(uap
, parm2
),
784 SCARG(uap
, parm3
), retval
);
786 code
= afs_syscall_iopen(uap
->parm1
, uap
->parm2
, uap
->parm3
787 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
791 #endif /* AFS_SUN5_ENV */
792 #if defined(AFS_NBSD40_ENV)
793 } else if (SCARG(uap
, syscall
) == AFSCALL_IDEC
) {
795 } else if (uap
->syscall
== AFSCALL_IDEC
) {
797 #if defined(AFS_NBSD40_ENV)
798 code
= afs_syscall_iincdec(SCARG(uap
, parm1
), SCARG(uap
, parm2
),
799 SCARG(uap
, parm3
), -1);
804 afs_syscall_iincdec(uap
->parm1
, uap
->parm2
, uap
->parm3
, -1
805 #if defined(AFS_SUN5_ENV)
810 #endif /* !AFS_NBSD40_ENV */
811 #if defined(AFS_NBSD40_ENV)
812 } else if (SCARG(uap
, syscall
) == AFSCALL_IINC
) {
814 } else if (uap
->syscall
== AFSCALL_IINC
) {
816 #if defined(AFS_NBSD40_ENV)
817 code
= afs_syscall_iincdec(SCARG(uap
, parm1
), SCARG(uap
, parm2
),
818 SCARG(uap
, parm3
), 1);
821 afs_syscall_iincdec(uap
->parm1
, uap
->parm2
, uap
->parm3
, 1
826 #endif /* !AFS_NBSD40_ENV */
827 #if defined(AFS_NBSD40_ENV)
828 } else if (SCARG(uap
, syscall
) == AFSCALL_ICL
) {
830 } else if (uap
->syscall
== AFSCALL_ICL
) {
834 #if defined(AFS_NBSD40_ENV)
835 Afscall_icl(SCARG(uap
, parm1
), SCARG(uap
, parm2
),
836 SCARG(uap
, parm3
), SCARG(uap
, parm4
),
837 SCARG(uap
, parm5
), retval
);
839 Afscall_icl(uap
->parm1
, uap
->parm2
, uap
->parm3
, uap
->parm4
,
840 uap
->parm5
, (long *)retval
);
841 #endif /* !AFS_NBSD40_ENV */
843 #ifdef AFS_LINUX20_ENV
845 /* ICL commands can return values. */
846 code
= -linux_ret
; /* Gets negated again at exit below */
850 #if defined(KERNEL_HAVE_UERROR)
854 #endif /* !AFS_LINUX20_ENV */
856 #if defined(KERNEL_HAVE_UERROR)
862 #if defined(AFS_DARWIN80_ENV)
863 if (uap
->syscall
!= AFSCALL_CALL
)
865 #ifdef AFS_DARWIN100_ENV
869 #ifdef AFS_LINUX20_ENV
874 #endif /* AFS_SGI_ENV */
875 #endif /* !AFS_AIX32_ENV */