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
11 * Glue code for the kopenafs API. Mostly just wrappers around the functions
12 * included in the libsys code.
16 #include <netinet/in.h>
20 #include <afsconfig.h>
21 #include <afs/afssyscalls.h>
24 static volatile sig_atomic_t syscall_okay = 1;
26 /* Signal handler to catch failed system calls and change the okay flag. */
32 signal(SIGSYS, sigsys_handler);
40 int okay, saved_errno;
41 RETSIGTYPE (*saved_func)(int);
46 saved_func = signal(SIGSYS, sigsys_handler);
53 lpioctl(NULL, VIOCSETTOK, (char *) &iob, 0);
56 signal(SIGSYS, saved_func);
60 if (!syscall_okay || errno != EINVAL)
73 k_pioctl(char *path, int cmd, struct ViceIoctl *cmarg, int follow)
75 return lpioctl(path, cmd, (char *) cmarg, follow);
87 return lpioctl(NULL, VIOCUNLOG, (char *) &iob, 0);