Annotation of linux/fs/ioctl.c, revision 1.1.1.8

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: 
1.1.1.8 ! root       10: #include <linux/stat.h>
1.1       root       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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.