|
|
1.1.1.2 root 1: /*
2: * linux/fs/ioctl.c
3: *
4: * (C) 1991 Linus Torvalds
5: */
6:
1.1.1.7 ! root 7: #include <linux/string.h>
1.1 root 8: #include <errno.h>
9: #include <sys/stat.h>
10:
11: #include <linux/sched.h>
12:
13: int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
14: {
15: struct file * filp;
16:
17: if (fd >= NR_OPEN || !(filp = current->filp[fd]))
18: return -EBADF;
1.1.1.7 ! root 19: if (filp->f_op && filp->f_op->ioctl)
! 20: return filp->f_op->ioctl(filp->f_inode, filp, cmd,arg);
! 21: return -EINVAL;
1.1 root 22: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.