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
9 * This file contains any necessary C glue to allow programs to communicate
10 * with the AFS kernel module. The necessary lower-level glue is defined in
14 #include <afsconfig.h>
15 #include <afs/param.h>
20 #include <afs/afs_args.h>
22 #include <sys/ioctl.h>
23 #if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)
31 #include "afssyscalls.h"
33 #ifdef AFS_LINUX20_ENV
34 int proc_afs_syscall(long syscall, long param1, long param2, long param3,
35 long param4, int *rval) {
36 struct afsprocdata syscall_data;
37 int fd = open(PROC_SYSCALL_FNAME, O_RDWR);
39 fd = open(PROC_SYSCALL_ARLA_FNAME, O_RDWR);
43 syscall_data.syscall = syscall;
44 syscall_data.param1 = param1;
45 syscall_data.param2 = param2;
46 syscall_data.param3 = param3;
47 syscall_data.param4 = param4;
49 *rval = ioctl(fd, VIOC_SYSCALL, &syscall_data);