tag | line | file | source code |
filp | 15 | fs/block_dev.c | int block_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 17 | fs/block_dev.c | int block = filp->f_pos >> BLOCK_SIZE_BITS; |
filp | 18 | fs/block_dev.c | int offset = filp->f_pos & (BLOCK_SIZE-1); |
filp | 46 | fs/block_dev.c | filp->f_pos += chars; |
filp | 59 | fs/block_dev.c | int block_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 61 | fs/block_dev.c | unsigned int block = filp->f_pos >> BLOCK_SIZE_BITS; |
filp | 62 | fs/block_dev.c | unsigned int offset = filp->f_pos & (BLOCK_SIZE-1); |
filp | 86 | fs/block_dev.c | filp->f_pos += chars; |
filp | 23 | fs/ext/blkdev.c | static int blkdev_open(struct inode * inode, struct file * filp) |
filp | 29 | fs/ext/blkdev.c | filp->f_op = blkdev_fops[i]; |
filp | 30 | fs/ext/blkdev.c | if (filp->f_op && filp->f_op->open) |
filp | 31 | fs/ext/blkdev.c | return filp->f_op->open(inode,filp); |
filp | 23 | fs/ext/chrdev.c | static int chrdev_open(struct inode * inode, struct file * filp) |
filp | 29 | fs/ext/chrdev.c | filp->f_op = chrdev_fops[i]; |
filp | 30 | fs/ext/chrdev.c | if (filp->f_op && filp->f_op->open) |
filp | 31 | fs/ext/chrdev.c | return filp->f_op->open(inode,filp); |
filp | 55 | fs/ext/dir.c | static int ext_readdir(struct inode * inode, struct file * filp, |
filp | 67 | fs/ext/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 68 | fs/ext/dir.c | offset = filp->f_pos & 1023; |
filp | 69 | fs/ext/dir.c | block = ext_bmap(inode,(filp->f_pos)>>BLOCK_SIZE_BITS); |
filp | 71 | fs/ext/dir.c | filp->f_pos += 1024-offset; |
filp | 75 | fs/ext/dir.c | while (offset < 1024 && filp->f_pos < inode->i_size) { |
filp | 77 | fs/ext/dir.c | filp->f_pos += de->rec_len; |
filp | 76 | fs/ext/file.c | static int ext_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 91 | fs/ext/file.c | if (filp->f_pos > inode->i_size) |
filp | 94 | fs/ext/file.c | left = inode->i_size - filp->f_pos; |
filp | 100 | fs/ext/file.c | block = filp->f_pos >> BLOCK_SIZE_BITS; |
filp | 101 | fs/ext/file.c | offset = filp->f_pos & (BLOCK_SIZE-1); |
filp | 136 | fs/ext/file.c | filp->f_pos += chars; |
filp | 160 | fs/ext/file.c | static int ext_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 179 | fs/ext/file.c | if (filp->f_flags & O_APPEND) |
filp | 182 | fs/ext/file.c | pos = filp->f_pos; |
filp | 217 | fs/ext/file.c | filp->f_pos = pos; |
filp | 190 | fs/ext/truncate.c | void ext_release(struct inode * inode, struct file * filp) |
filp | 20 | fs/fcntl.c | if (fd >= NR_OPEN || !current->filp[fd]) |
filp | 25 | fs/fcntl.c | if (current->filp[arg]) |
filp | 32 | fs/fcntl.c | (current->filp[arg] = current->filp[fd])->f_count++; |
filp | 38 | fs/fcntl.c | if (oldfd >= NR_OPEN || !current->filp[oldfd]) |
filp | 53 | fs/fcntl.c | struct file * filp; |
filp | 55 | fs/fcntl.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
filp | 69 | fs/fcntl.c | return filp->f_flags; |
filp | 71 | fs/fcntl.c | filp->f_flags &= ~(O_APPEND | O_NONBLOCK); |
filp | 72 | fs/fcntl.c | filp->f_flags |= arg & (O_APPEND | O_NONBLOCK); |
filp | 16 | fs/fifo.c | static int fifo_open(struct inode * inode,struct file * filp) |
filp | 21 | fs/fifo.c | switch( filp->f_mode ) { |
filp | 29 | fs/fifo.c | filp->f_op = &read_pipe_fops; |
filp | 31 | fs/fifo.c | if (!(filp->f_flags & O_NONBLOCK)) |
filp | 51 | fs/fifo.c | if ((filp->f_flags & O_NONBLOCK) && !PIPE_READERS(*inode)) { |
filp | 55 | fs/fifo.c | filp->f_op = &write_pipe_fops; |
filp | 75 | fs/fifo.c | filp->f_op = &rdwr_pipe_fops; |
filp | 16 | fs/ioctl.c | struct file * filp; |
filp | 19 | fs/ioctl.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
filp | 21 | fs/ioctl.c | if (S_ISREG(filp->f_inode->i_mode) && cmd == BMAP_IOCTL && |
filp | 22 | fs/ioctl.c | filp->f_inode->i_op->bmap) { |
filp | 24 | fs/ioctl.c | block = filp->f_inode->i_op->bmap(filp->f_inode,block); |
filp | 28 | fs/ioctl.c | if (filp->f_op && filp->f_op->ioctl) |
filp | 29 | fs/ioctl.c | return filp->f_op->ioctl(filp->f_inode, filp, cmd,arg); |
filp | 17 | fs/minix/blkdev.c | static int blkdev_open(struct inode * inode, struct file * filp) |
filp | 23 | fs/minix/blkdev.c | filp->f_op = blkdev_fops[i]; |
filp | 24 | fs/minix/blkdev.c | if (filp->f_op && filp->f_op->open) |
filp | 25 | fs/minix/blkdev.c | return filp->f_op->open(inode,filp); |
filp | 17 | fs/minix/chrdev.c | static int chrdev_open(struct inode * inode, struct file * filp) |
filp | 23 | fs/minix/chrdev.c | filp->f_op = chrdev_fops[i]; |
filp | 24 | fs/minix/chrdev.c | if (filp->f_op && filp->f_op->open) |
filp | 25 | fs/minix/chrdev.c | return filp->f_op->open(inode,filp); |
filp | 49 | fs/minix/dir.c | static int minix_readdir(struct inode * inode, struct file * filp, |
filp | 59 | fs/minix/dir.c | if (filp->f_pos & (sizeof (struct minix_dir_entry) - 1)) |
filp | 61 | fs/minix/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 62 | fs/minix/dir.c | offset = filp->f_pos & 1023; |
filp | 63 | fs/minix/dir.c | block = minix_bmap(inode,(filp->f_pos)>>BLOCK_SIZE_BITS); |
filp | 65 | fs/minix/dir.c | filp->f_pos += 1024-offset; |
filp | 69 | fs/minix/dir.c | while (offset < 1024 && filp->f_pos < inode->i_size) { |
filp | 71 | fs/minix/dir.c | filp->f_pos += sizeof (struct minix_dir_entry); |
filp | 76 | fs/minix/file.c | int minix_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 91 | fs/minix/file.c | if (filp->f_pos > inode->i_size) |
filp | 94 | fs/minix/file.c | left = inode->i_size - filp->f_pos; |
filp | 100 | fs/minix/file.c | block = filp->f_pos >> BLOCK_SIZE_BITS; |
filp | 101 | fs/minix/file.c | offset = filp->f_pos & (BLOCK_SIZE-1); |
filp | 136 | fs/minix/file.c | filp->f_pos += chars; |
filp | 160 | fs/minix/file.c | static int minix_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 179 | fs/minix/file.c | if (filp->f_flags & O_APPEND) |
filp | 182 | fs/minix/file.c | pos = filp->f_pos; |
filp | 217 | fs/minix/file.c | filp->f_pos = pos; |
filp | 147 | fs/minix/truncate.c | void minix_release(struct inode * inode, struct file * filp) |
filp | 17 | fs/msdos/dir.c | static int msdos_dummy_read(struct inode *inode,struct file *filp,char *buf, |
filp | 19 | fs/msdos/dir.c | static int msdos_readdir(struct inode *inode,struct file *filp, |
filp | 54 | fs/msdos/dir.c | static int msdos_dummy_read(struct inode *inode,struct file *filp,char *buf, |
filp | 67 | fs/msdos/dir.c | static int msdos_readdir(struct inode *inode,struct file *filp, |
filp | 78 | fs/msdos/dir.c | if (filp->f_pos == 2) filp->f_pos = 0; |
filp | 79 | fs/msdos/dir.c | else if (filp->f_pos < 2) { |
filp | 80 | fs/msdos/dir.c | walk = filp->f_pos++ ? ".." : "."; |
filp | 89 | fs/msdos/dir.c | if (filp->f_pos & (sizeof(struct msdos_dir_entry)-1)) return -ENOENT; |
filp | 91 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
filp | 22 | fs/msdos/file.c | static int msdos_file_read(struct inode *inode,struct file *filp,char *buf, |
filp | 24 | fs/msdos/file.c | static int msdos_file_write(struct inode *inode,struct file *filp,char *buf, |
filp | 76 | fs/msdos/file.c | static int msdos_file_read(struct inode *inode,struct file *filp,char *buf, |
filp | 94 | fs/msdos/file.c | if (filp->f_pos >= inode->i_size || count <= 0) return 0; |
filp | 96 | fs/msdos/file.c | while (left = MIN(inode->i_size-filp->f_pos,count-(buf-start))) { |
filp | 97 | fs/msdos/file.c | if (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
filp | 99 | fs/msdos/file.c | offset = filp->f_pos & (SECTOR_SIZE-1); |
filp | 101 | fs/msdos/file.c | filp->f_pos += (size = MIN(SECTOR_SIZE-offset,left)); |
filp | 112 | fs/msdos/file.c | filp->f_pos = inode->i_size; |
filp | 125 | fs/msdos/file.c | static int msdos_file_write(struct inode *inode,struct file *filp,char *buf, |
filp | 146 | fs/msdos/file.c | if (filp->f_flags & O_APPEND) filp->f_pos = inode->i_size; |
filp | 150 | fs/msdos/file.c | while (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
filp | 153 | fs/msdos/file.c | offset = filp->f_pos & (SECTOR_SIZE-1); |
filp | 160 | fs/msdos/file.c | memcpy_fromfs(data+(filp->f_pos & (SECTOR_SIZE-1)), |
filp | 166 | fs/msdos/file.c | to = data+(filp->f_pos & (SECTOR_SIZE-1)); |
filp | 185 | fs/msdos/file.c | filp->f_pos += written; |
filp | 186 | fs/msdos/file.c | if (filp->f_pos > inode->i_size) { |
filp | 187 | fs/msdos/file.c | inode->i_size = filp->f_pos; |
filp | 55 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 93 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 219 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 257 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 304 | fs/open.c | if (!current->filp[fd]) |
filp | 312 | fs/open.c | current->filp[fd] = f; |
filp | 314 | fs/open.c | current->filp[fd]=NULL; |
filp | 330 | fs/open.c | current->filp[fd]=NULL; |
filp | 343 | fs/open.c | struct file * filp; |
filp | 349 | fs/open.c | if (!(filp = current->filp[fd])) |
filp | 351 | fs/open.c | current->filp[fd] = NULL; |
filp | 352 | fs/open.c | if (filp->f_count == 0) { |
filp | 356 | fs/open.c | if (filp->f_count > 1) { |
filp | 357 | fs/open.c | filp->f_count--; |
filp | 360 | fs/open.c | inode = filp->f_inode; |
filp | 361 | fs/open.c | if (filp->f_op && filp->f_op->release) |
filp | 362 | fs/open.c | filp->f_op->release(inode,filp); |
filp | 363 | fs/open.c | filp->f_count--; |
filp | 364 | fs/open.c | filp->f_inode = NULL; |
filp | 16 | fs/pipe.c | static int pipe_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 20 | fs/pipe.c | if (!(filp->f_flags & O_NONBLOCK)) |
filp | 46 | fs/pipe.c | static int pipe_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 67 | fs/pipe.c | if (filp->f_flags & O_NONBLOCK) |
filp | 101 | fs/pipe.c | static int bad_pipe_rw(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 106 | fs/pipe.c | static int pipe_ioctl(struct inode *pino, struct file * filp, |
filp | 119 | fs/pipe.c | static int pipe_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 145 | fs/pipe.c | static void pipe_read_release(struct inode * inode, struct file * filp) |
filp | 151 | fs/pipe.c | static void pipe_write_release(struct inode * inode, struct file * filp) |
filp | 157 | fs/pipe.c | static void pipe_rdwr_release(struct inode * inode, struct file * filp) |
filp | 219 | fs/pipe.c | if (!current->filp[i]) { |
filp | 220 | fs/pipe.c | current->filp[ fd[j]=i ] = f[j]; |
filp | 224 | fs/pipe.c | current->filp[fd[0]]=NULL; |
filp | 231 | fs/pipe.c | current->filp[fd[0]] = NULL; |
filp | 232 | fs/pipe.c | current->filp[fd[1]] = NULL; |
filp | 25 | fs/read_write.c | if (fd >= NR_OPEN || !(file = current->filp[fd]) || |
filp | 40 | fs/read_write.c | if (fd >= NR_OPEN || !(file=current->filp[fd]) || !(file->f_inode)) |
filp | 73 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
filp | 90 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
filp | 84 | fs/select.c | if (!current->filp[i]) |
filp | 86 | fs/select.c | if (!current->filp[i]->f_inode) |
filp | 88 | fs/select.c | if (current->filp[i]->f_inode->i_pipe) |
filp | 90 | fs/select.c | if (S_ISCHR(current->filp[i]->f_inode->i_mode)) |
filp | 92 | fs/select.c | if (S_ISFIFO(current->filp[i]->f_inode->i_mode)) |
filp | 94 | fs/select.c | if (S_ISSOCK(current->filp[i]->f_inode->i_mode)) |
filp | 105 | fs/select.c | file = current->filp[i]; |
filp | 131 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
filp | 142 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
filp | 80 | include/linux/ext_fs.h | extern int ext_open(struct inode * inode, struct file * filp); |
filp | 81 | include/linux/ext_fs.h | extern void ext_release(struct inode * inode, struct file * filp); |
filp | 47 | include/linux/minix_fs.h | extern int minix_open(struct inode * inode, struct file * filp); |
filp | 48 | include/linux/minix_fs.h | extern void minix_release(struct inode * inode, struct file * filp); |
filp | 162 | include/linux/sched.h | struct file * filp[NR_OPEN]; |
filp | 244 | include/linux/tty.h | extern int serial_open(unsigned int line, struct file * filp); |
filp | 245 | include/linux/tty.h | extern void serial_close(unsigned int line, struct file * filp); |
filp | 253 | include/linux/tty.h | extern int pty_open(unsigned int dev, struct file * filp); |
filp | 254 | include/linux/tty.h | extern void pty_close(unsigned int dev, struct file * filp); |
filp | 1002 | kernel/blk_drv/floppy.c | static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, |
filp | 1140 | kernel/blk_drv/floppy.c | static int floppy_open(struct inode * inode, struct file * filp) |
filp | 1154 | kernel/blk_drv/floppy.c | if (filp && filp->f_mode) |
filp | 1159 | kernel/blk_drv/floppy.c | static void floppy_release(struct inode * inode, struct file * filp) |
filp | 23 | kernel/chr_drv/pty.c | int pty_open(unsigned int dev, struct file * filp) |
filp | 31 | kernel/chr_drv/pty.c | if (filp->f_flags & O_NDELAY) |
filp | 40 | kernel/chr_drv/pty.c | void pty_close(unsigned int dev, struct file * filp) |
filp | 285 | kernel/chr_drv/serial.c | void serial_close(unsigned line, struct file * filp) |
filp | 367 | kernel/chr_drv/serial.c | int serial_open(unsigned line, struct file * filp) |
filp | 502 | kernel/chr_drv/tty_io.c | static int tty_open(struct inode * inode, struct file * filp) |
filp | 514 | kernel/chr_drv/tty_io.c | filp->f_rdev = 0x0400 | dev; |
filp | 529 | kernel/chr_drv/tty_io.c | if (!(filp->f_flags & O_NOCTTY) && |
filp | 538 | kernel/chr_drv/tty_io.c | retval = serial_open(dev-64,filp); |
filp | 540 | kernel/chr_drv/tty_io.c | retval = pty_open(dev,filp); |
filp | 554 | kernel/chr_drv/tty_io.c | static void tty_release(struct inode * inode, struct file * filp) |
filp | 559 | kernel/chr_drv/tty_io.c | dev = filp->f_rdev; |
filp | 564 | kernel/chr_drv/tty_io.c | dev = MINOR(filp->f_rdev); |
filp | 573 | kernel/chr_drv/tty_io.c | serial_close(dev-64,filp); |
filp | 575 | kernel/chr_drv/tty_io.c | pty_close(dev,filp); |
filp | 583 | kernel/chr_drv/tty_io.c | static int tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 588 | kernel/chr_drv/tty_io.c | dev = filp->f_rdev; |
filp | 593 | kernel/chr_drv/tty_io.c | dev = MINOR(filp->f_rdev); |
filp | 303 | kernel/exit.c | if (current->filp[i]) |
filp | 177 | kernel/fork.c | if (f=p->filp[i]) |
filp | 101 | mm/mmap.c | if (fd >= NR_OPEN || fd < 0 || !(file = current->filp[fd])) |
filp | 83 | net/socket.c | if (!current->filp[fd]) |
filp | 93 | net/socket.c | current->filp[fd] = file; |
filp | 111 | net/socket.c | current->filp[fd]->f_inode = NULL; /* safe from iput */ |
filp | 131 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd])) |