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.
15 #include <sys/param.h>
16 #include <netinet/in.h>
21 #include <afsconfig.h>
22 #include <afs/afssyscalls.h>
25 static volatile sig_atomic_t syscall_okay = 1;
27 /* Signal handler to catch failed system calls and change the okay flag. */
33 signal(SIGSYS, sigsys_handler);
41 int okay, saved_errno;
42 RETSIGTYPE (*saved_func)(int);
47 saved_func = signal(SIGSYS, sigsys_handler);
54 lpioctl(NULL, VIOCSETTOK, &iob, 0);
57 signal(SIGSYS, saved_func);
61 if (!syscall_okay || errno != EINVAL)
74 k_pioctl(char *path, int cmd, struct ViceIoctl *cmarg, int follow)
76 return lpioctl(path, cmd, cmarg, follow);
88 return lpioctl(NULL, VIOCUNLOG, &iob, 0);