AFS-PAG
view release on metacpan or search on metacpan
kafs/sys-linux.c view on Meta::CPAN
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* The struct passed to ioctl to do an AFS system call. Definition taken from
* the afs/afs_args.h OpenAFS header.
*/
struct afsprocdata {
long param4;
long param3;
long param2;
long param1;
long syscall;
};
/*
* The workhorse function that does the actual system call. All the values
kafs/sys-linux.c view on Meta::CPAN
* by Arla (at least some versions).
*
* Returns -1 and sets errno to ENOSYS if attempting a system call fails and 0
* otherwise. If the system call was made, its return status will be stored
* in rval.
*/
static int
k_syscall(long call, long param1, long param2, long param3, long param4,
int *rval)
{
struct afsprocdata syscall_data;
int fd, oerrno;
fd = open("/proc/fs/openafs/afs_ioctl", O_RDWR);
if (fd < 0)
fd = open("/proc/fs/nnpfs/afs_ioctl", O_RDWR);
if (fd < 0) {
errno = ENOSYS;
return -1;
}
( run in 0.225 second using v1.01-cache-2.11-cpan-454fe037f31 )