tag | line | file | source code |
filp | 100 | drivers/block/cdu31a.c | static int scd_open(struct inode *inode, struct file *filp); |
filp | 1593 | drivers/block/cdu31a.c | struct file *filp) |
filp | 1671 | drivers/block/cdu31a.c | struct file *filp) |
filp | 1105 | drivers/block/floppy.c | static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, |
filp | 1271 | drivers/block/floppy.c | static int floppy_open(struct inode * inode, struct file * filp) |
filp | 1286 | drivers/block/floppy.c | if (filp && filp->f_mode) |
filp | 1291 | drivers/block/floppy.c | static void floppy_release(struct inode * inode, struct file * filp) |
filp | 574 | drivers/block/hd.c | static int hd_open(struct inode * inode, struct file * filp) |
filp | 1691 | drivers/char/console.c | int con_open(struct tty_struct *tty, struct file * filp) |
filp | 347 | drivers/char/mem.c | static int memory_open(struct inode * inode, struct file * filp) |
filp | 351 | drivers/char/mem.c | filp->f_op = &ram_fops; |
filp | 354 | drivers/char/mem.c | filp->f_op = &mem_fops; |
filp | 357 | drivers/char/mem.c | filp->f_op = &kmem_fops; |
filp | 360 | drivers/char/mem.c | filp->f_op = &null_fops; |
filp | 363 | drivers/char/mem.c | filp->f_op = &port_fops; |
filp | 366 | drivers/char/mem.c | filp->f_op = &zero_fops; |
filp | 369 | drivers/char/mem.c | filp->f_op = &full_fops; |
filp | 374 | drivers/char/mem.c | if (filp->f_op && filp->f_op->open) |
filp | 375 | drivers/char/mem.c | return filp->f_op->open(inode,filp); |
filp | 52 | drivers/char/pty.c | static void pty_close(struct tty_struct * tty, struct file * filp) |
filp | 137 | drivers/char/pty.c | int pty_open(struct tty_struct *tty, struct file * filp) |
filp | 153 | drivers/char/pty.c | if (filp->f_flags & O_NDELAY) |
filp | 1672 | drivers/char/serial.c | static void rs_close(struct tty_struct *tty, struct file * filp) |
filp | 1679 | drivers/char/serial.c | if (tty_hung_up_p(filp)) |
filp | 1773 | drivers/char/serial.c | static int block_til_ready(struct tty_struct *tty, struct file * filp, |
filp | 1819 | drivers/char/serial.c | if (filp->f_flags & O_NONBLOCK) { |
filp | 1849 | drivers/char/serial.c | if (tty_hung_up_p(filp) || |
filp | 1878 | drivers/char/serial.c | if (!tty_hung_up_p(filp)) |
filp | 1897 | drivers/char/serial.c | int rs_open(struct tty_struct *tty, struct file * filp) |
filp | 1930 | drivers/char/serial.c | retval = block_til_ready(tty, filp, info); |
filp | 1810 | drivers/char/tpqic02.c | static int tape_qic02_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 1814 | drivers/char/tpqic02.c | unsigned short flags = filp->f_flags; |
filp | 1820 | drivers/char/tpqic02.c | MINOR(dev), buf, count, filp->f_pos, flags); |
filp | 1941 | drivers/char/tpqic02.c | filp->f_pos += bytes_done; |
filp | 1980 | drivers/char/tpqic02.c | static int tape_qic02_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 1984 | drivers/char/tpqic02.c | unsigned short flags = filp->f_flags; |
filp | 1989 | drivers/char/tpqic02.c | MINOR(dev), buf, count, filp->f_pos, flags); |
filp | 2104 | drivers/char/tpqic02.c | filp->f_pos += bytes_done; |
filp | 2127 | drivers/char/tpqic02.c | static int tape_qic02_open(struct inode * inode, struct file * filp) |
filp | 2130 | drivers/char/tpqic02.c | unsigned short flags = filp->f_flags; |
filp | 2284 | drivers/char/tpqic02.c | static int tape_qic02_readdir(struct inode * inode, struct file * filp, struct dirent * dp, int count) |
filp | 2290 | drivers/char/tpqic02.c | static void tape_qic02_release(struct inode * inode, struct file * filp) |
filp | 2324 | drivers/char/tpqic02.c | static int tape_qic02_ioctl(struct inode * inode, struct file * filp, |
filp | 96 | drivers/char/tty_io.c | static int tty_fasync(struct inode * inode, struct file * filp, int on); |
filp | 261 | drivers/char/tty_io.c | static int hung_up_tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 308 | drivers/char/tty_io.c | struct file * filp; |
filp | 313 | drivers/char/tty_io.c | for (filp = first_file, i=0; i<nr_files; i++, filp = filp->f_next) { |
filp | 314 | drivers/char/tty_io.c | if (!filp->f_count) |
filp | 316 | drivers/char/tty_io.c | if (filp->private_data != tty) |
filp | 318 | drivers/char/tty_io.c | if (filp->f_inode && filp->f_inode->i_rdev == CONSOLE_DEV) |
filp | 320 | drivers/char/tty_io.c | if (filp->f_op != &tty_fops) |
filp | 322 | drivers/char/tty_io.c | tty_fasync(filp->f_inode, filp, 0); |
filp | 323 | drivers/char/tty_io.c | filp->f_op = fops; |
filp | 384 | drivers/char/tty_io.c | int tty_hung_up_p(struct file * filp) |
filp | 386 | drivers/char/tty_io.c | return (filp->f_op == &hung_up_tty_fops); |
filp | 875 | drivers/char/tty_io.c | static void release_dev(struct file * filp) |
filp | 883 | drivers/char/tty_io.c | tty = filp->private_data; |
filp | 884 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, filp->f_inode->i_rdev, "release_dev")) |
filp | 887 | drivers/char/tty_io.c | tty_fasync(filp->f_inode, filp, 0); |
filp | 951 | drivers/char/tty_io.c | tty->driver.close(tty, filp); |
filp | 1052 | drivers/char/tty_io.c | static int tty_open(struct inode * inode, struct file * filp) |
filp | 1060 | drivers/char/tty_io.c | noctty = filp->f_flags & O_NOCTTY; |
filp | 1075 | drivers/char/tty_io.c | filp->private_data = tty; |
filp | 1087 | drivers/char/tty_io.c | retval = tty->driver.open(tty, filp); |
filp | 1096 | drivers/char/tty_io.c | release_dev(filp); |
filp | 1105 | drivers/char/tty_io.c | filp->f_op = &tty_fops; |
filp | 1124 | drivers/char/tty_io.c | static void tty_release(struct inode * inode, struct file * filp) |
filp | 1126 | drivers/char/tty_io.c | release_dev(filp); |
filp | 1129 | drivers/char/tty_io.c | static int tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 1133 | drivers/char/tty_io.c | tty = filp->private_data; |
filp | 1138 | drivers/char/tty_io.c | return (tty->ldisc.select)(tty, inode, filp, sel_type, wait); |
filp | 1142 | drivers/char/tty_io.c | static int tty_fasync(struct inode * inode, struct file * filp, int on) |
filp | 1147 | drivers/char/tty_io.c | tty = filp->private_data; |
filp | 1152 | drivers/char/tty_io.c | if (fa->fa_file == filp) |
filp | 1163 | drivers/char/tty_io.c | fa->fa_file = filp; |
filp | 1425 | drivers/char/tty_io.c | struct file *filp; |
filp | 1439 | drivers/char/tty_io.c | filp = (*p)->files->fd[i]; |
filp | 1440 | drivers/char/tty_io.c | if (filp && (filp->f_op == &tty_fops) && |
filp | 1441 | drivers/char/tty_io.c | (filp->private_data == tty)) { |
filp | 143 | drivers/net/ppp.c | struct file * filp, int sel_type, select_table * wait); |
filp | 1569 | drivers/net/ppp.c | struct file * filp, int sel_type, select_table * wait) |
filp | 1603 | drivers/net/ppp.c | if (tty_hung_up_p(filp)) |
filp | 61 | drivers/scsi/sd.c | static int sd_open(struct inode * inode, struct file * filp) |
filp | 72 | drivers/scsi/sg.c | static int sg_open(struct inode * inode, struct file * filp) |
filp | 75 | drivers/scsi/sg.c | int flags=filp->f_flags; |
filp | 112 | drivers/scsi/sg.c | static void sg_close(struct inode * inode, struct file * filp) |
filp | 153 | drivers/scsi/sg.c | static int sg_read(struct inode *inode,struct file *filp,char *buf,int count) |
filp | 162 | drivers/scsi/sg.c | if (filp->f_flags & O_NONBLOCK) |
filp | 207 | drivers/scsi/sg.c | static int sg_write(struct inode *inode,struct file *filp,char *buf,int count) |
filp | 221 | drivers/scsi/sg.c | if (filp->f_flags & O_NONBLOCK) |
filp | 251 | drivers/scsi/sg.c | if (!(SCpnt=allocate_device(NULL,device->device->index, !(filp->f_flags & O_NONBLOCK)))) |
filp | 261 | drivers/scsi/sr.c | static int sr_open(struct inode * inode, struct file * filp) |
filp | 325 | drivers/scsi/st.c | flush_buffer(struct inode * inode, struct file * filp, int seek_next) |
filp | 358 | drivers/scsi/st.c | result = st_int_ioctl(inode, filp, MTBSR, backspace); |
filp | 367 | drivers/scsi/st.c | scsi_tape_open(struct inode * inode, struct file * filp) |
filp | 398 | drivers/scsi/st.c | flags = filp->f_flags; |
filp | 568 | drivers/scsi/st.c | scsi_tape_close(struct inode * inode, struct file * filp) |
filp | 588 | drivers/scsi/st.c | printk("st%d: File length %ld bytes.\n", dev, filp->f_pos); |
filp | 625 | drivers/scsi/st.c | flush_buffer(inode, filp, 0); |
filp | 630 | drivers/scsi/st.c | st_int_ioctl(inode, filp, MTREW, 1); |
filp | 641 | drivers/scsi/st.c | st_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 667 | drivers/scsi/st.c | retval = flush_buffer(inode, filp, 0); |
filp | 768 | drivers/scsi/st.c | filp->f_pos += do_count - transfer; |
filp | 807 | drivers/scsi/st.c | filp->f_pos += do_count; |
filp | 823 | drivers/scsi/st.c | filp->f_pos += count; |
filp | 868 | drivers/scsi/st.c | st_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 894 | drivers/scsi/st.c | transfer = flush_buffer(inode, filp, 0); |
filp | 1057 | drivers/scsi/st.c | filp->f_pos += transfer; |
filp | 19 | fs/block_dev.c | int block_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 48 | fs/block_dev.c | block = filp->f_pos >> blocksize_bits; |
filp | 49 | fs/block_dev.c | offset = filp->f_pos & (blocksize-1); |
filp | 75 | fs/block_dev.c | if(!filp->f_reada || |
filp | 110 | fs/block_dev.c | filp->f_pos += chars; |
filp | 120 | fs/block_dev.c | filp->f_reada = 1; |
filp | 124 | fs/block_dev.c | int block_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 153 | fs/block_dev.c | offset = filp->f_pos; |
filp | 175 | fs/block_dev.c | if (filp->f_reada) { |
filp | 244 | fs/block_dev.c | filp->f_pos += chars; |
filp | 269 | fs/block_dev.c | filp->f_reada = 1; |
filp | 273 | fs/block_dev.c | int block_fsync(struct inode *inode, struct file *filp) |
filp | 247 | fs/buffer.c | int file_fsync (struct inode *inode, struct file *filp) |
filp | 116 | fs/devices.c | int blkdev_open(struct inode * inode, struct file * filp) |
filp | 123 | fs/devices.c | filp->f_op = blkdevs[i].fops; |
filp | 124 | fs/devices.c | if (filp->f_op->open) |
filp | 125 | fs/devices.c | return filp->f_op->open(inode,filp); |
filp | 167 | fs/devices.c | int chrdev_open(struct inode * inode, struct file * filp) |
filp | 174 | fs/devices.c | filp->f_op = chrdevs[i].fops; |
filp | 175 | fs/devices.c | if (filp->f_op->open) |
filp | 176 | fs/devices.c | return filp->f_op->open(inode,filp); |
filp | 23 | fs/ext/dir.c | static int ext_dir_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 64 | fs/ext/dir.c | static int ext_readdir(struct inode * inode, struct file * filp, |
filp | 74 | fs/ext/dir.c | if (filp->f_pos % 8 != 0) |
filp | 76 | fs/ext/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 77 | fs/ext/dir.c | offset = filp->f_pos & 1023; |
filp | 78 | fs/ext/dir.c | bh = ext_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
filp | 80 | fs/ext/dir.c | filp->f_pos += 1024-offset; |
filp | 84 | fs/ext/dir.c | while (offset < 1024 && filp->f_pos < inode->i_size) { |
filp | 87 | fs/ext/dir.c | (de->rec_len + filp->f_pos - 1) / 1024 > (filp->f_pos / 1024)) { |
filp | 91 | fs/ext/dir.c | filp->f_pos += 1024-offset; |
filp | 92 | fs/ext/dir.c | if (filp->f_pos > inode->i_size) |
filp | 93 | fs/ext/dir.c | filp->f_pos = inode->i_size; |
filp | 97 | fs/ext/dir.c | filp->f_pos += de->rec_len; |
filp | 72 | fs/ext/file.c | static int ext_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 90 | fs/ext/file.c | offset = filp->f_pos; |
filp | 106 | fs/ext/file.c | if (filp->f_reada) { |
filp | 164 | fs/ext/file.c | filp->f_pos += chars; |
filp | 189 | fs/ext/file.c | filp->f_reada = 1; |
filp | 197 | fs/ext/file.c | static int ext_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 216 | fs/ext/file.c | if (filp->f_flags & O_APPEND) |
filp | 219 | fs/ext/file.c | pos = filp->f_pos; |
filp | 255 | fs/ext/file.c | filp->f_pos = pos; |
filp | 249 | fs/ext/truncate.c | void ext_release(struct inode * inode, struct file * filp) |
filp | 25 | fs/ext2/dir.c | static int ext2_dir_read (struct inode * inode, struct file * filp, |
filp | 91 | fs/ext2/dir.c | static int ext2_readdir (struct inode * inode, struct file * filp, |
filp | 104 | fs/ext2/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 105 | fs/ext2/dir.c | offset = filp->f_pos & (sb->s_blocksize - 1); |
filp | 106 | fs/ext2/dir.c | blk = (filp->f_pos) >> EXT2_BLOCK_SIZE_BITS(sb); |
filp | 109 | fs/ext2/dir.c | filp->f_pos += sb->s_blocksize - offset; |
filp | 133 | fs/ext2/dir.c | while (offset < sb->s_blocksize && filp->f_pos < inode->i_size) { |
filp | 140 | fs/ext2/dir.c | filp->f_pos += de->rec_len; |
filp | 75 | fs/ext2/file.c | static int ext2_file_read (struct inode * inode, struct file * filp, |
filp | 99 | fs/ext2/file.c | offset = filp->f_pos; |
filp | 115 | fs/ext2/file.c | if (filp->f_reada) { |
filp | 190 | fs/ext2/file.c | filp->f_pos += chars; |
filp | 218 | fs/ext2/file.c | filp->f_reada = 1; |
filp | 226 | fs/ext2/file.c | static int ext2_file_write (struct inode * inode, struct file * filp, |
filp | 253 | fs/ext2/file.c | if (filp->f_flags & O_APPEND) |
filp | 256 | fs/ext2/file.c | pos = filp->f_pos; |
filp | 291 | fs/ext2/file.c | filp->f_pos = pos; |
filp | 301 | fs/ext2/file.c | static void ext2_release_file (struct inode * inode, struct file * filp) |
filp | 303 | fs/ext2/file.c | if (filp->f_mode & 2) |
filp | 17 | fs/ext2/ioctl.c | int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, |
filp | 68 | fs/fcntl.c | struct file * filp; |
filp | 70 | fs/fcntl.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) |
filp | 84 | fs/fcntl.c | return filp->f_flags; |
filp | 86 | fs/fcntl.c | if ((arg & FASYNC) && !(filp->f_flags & FASYNC) && |
filp | 87 | fs/fcntl.c | filp->f_op->fasync) |
filp | 88 | fs/fcntl.c | filp->f_op->fasync(filp->f_inode, filp, 1); |
filp | 89 | fs/fcntl.c | if (!(arg & FASYNC) && (filp->f_flags & FASYNC) && |
filp | 90 | fs/fcntl.c | filp->f_op->fasync) |
filp | 91 | fs/fcntl.c | filp->f_op->fasync(filp->f_inode, filp, 0); |
filp | 92 | fs/fcntl.c | filp->f_flags &= ~(O_APPEND | O_NONBLOCK | FASYNC); |
filp | 93 | fs/fcntl.c | filp->f_flags |= arg & (O_APPEND | O_NONBLOCK | |
filp | 110 | fs/fcntl.c | return filp->f_owner; |
filp | 112 | fs/fcntl.c | filp->f_owner = arg; /* XXX security implications? */ |
filp | 113 | fs/fcntl.c | if (S_ISSOCK (filp->f_inode->i_mode)) |
filp | 114 | fs/fcntl.c | sock_fcntl (filp, F_SETOWN, arg); |
filp | 118 | fs/fcntl.c | if (S_ISSOCK (filp->f_inode->i_mode)) |
filp | 120 | fs/fcntl.c | return (sock_fcntl (filp, cmd, arg)); |
filp | 12 | fs/fifo.c | static int fifo_open(struct inode * inode,struct file * filp) |
filp | 17 | fs/fifo.c | switch( filp->f_mode ) { |
filp | 25 | fs/fifo.c | filp->f_op = &connecting_fifo_fops; |
filp | 28 | fs/fifo.c | if (!(filp->f_flags & O_NONBLOCK) && !PIPE_WRITERS(*inode)) { |
filp | 43 | fs/fifo.c | filp->f_op = &read_fifo_fops; |
filp | 54 | fs/fifo.c | if ((filp->f_flags & O_NONBLOCK) && !PIPE_READERS(*inode)) { |
filp | 58 | fs/fifo.c | filp->f_op = &write_fifo_fops; |
filp | 86 | fs/fifo.c | filp->f_op = &rdwr_fifo_fops; |
filp | 183 | fs/hpfs/hpfs_fs.c | static int hpfs_dir_read(struct inode *inode, struct file *filp, |
filp | 185 | fs/hpfs/hpfs_fs.c | static int hpfs_readdir(struct inode *inode, struct file *filp, |
filp | 863 | fs/hpfs/hpfs_fs.c | static int hpfs_file_read(struct inode *inode, struct file *filp, |
filp | 877 | fs/hpfs/hpfs_fs.c | if (count > inode->i_size - filp->f_pos) |
filp | 878 | fs/hpfs/hpfs_fs.c | count = inode->i_size - filp->f_pos; |
filp | 886 | fs/hpfs/hpfs_fs.c | q = filp->f_pos >> 9; |
filp | 887 | fs/hpfs/hpfs_fs.c | r = filp->f_pos & 511; |
filp | 923 | fs/hpfs/hpfs_fs.c | if (count > inode->i_size - filp->f_pos - n + n0) |
filp | 924 | fs/hpfs/hpfs_fs.c | count = inode->i_size - filp->f_pos - n + n0; |
filp | 932 | fs/hpfs/hpfs_fs.c | filp->f_pos += n; |
filp | 1329 | fs/hpfs/hpfs_fs.c | static int hpfs_readdir(struct inode *inode, struct file *filp, |
filp | 1344 | fs/hpfs/hpfs_fs.c | switch (filp->f_pos) { |
filp | 1347 | fs/hpfs/hpfs_fs.c | filp->f_pos = -1; |
filp | 1353 | fs/hpfs/hpfs_fs.c | filp->f_pos = 1; |
filp | 1360 | fs/hpfs/hpfs_fs.c | de = map_pos_dirent(inode, &filp->f_pos, &qbh); |
filp | 1362 | fs/hpfs/hpfs_fs.c | filp->f_pos = -2; |
filp | 1561 | fs/hpfs/hpfs_fs.c | static int hpfs_dir_read(struct inode *inode, struct file *filp, |
filp | 16 | fs/ioctl.c | static int file_ioctl(struct file *filp,unsigned int cmd,unsigned long arg) |
filp | 23 | fs/ioctl.c | if (filp->f_inode->i_op == NULL) |
filp | 25 | fs/ioctl.c | if (filp->f_inode->i_op->bmap == NULL) |
filp | 31 | fs/ioctl.c | block = filp->f_inode->i_op->bmap(filp->f_inode,block); |
filp | 35 | fs/ioctl.c | if (filp->f_inode->i_sb == NULL) |
filp | 40 | fs/ioctl.c | put_fs_long(filp->f_inode->i_sb->s_blocksize, |
filp | 47 | fs/ioctl.c | put_fs_long(filp->f_inode->i_size - filp->f_pos, |
filp | 51 | fs/ioctl.c | if (filp->f_op && filp->f_op->ioctl) |
filp | 52 | fs/ioctl.c | return filp->f_op->ioctl(filp->f_inode, filp, cmd,arg); |
filp | 59 | fs/ioctl.c | struct file * filp; |
filp | 62 | fs/ioctl.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) |
filp | 76 | fs/ioctl.c | filp->f_flags |= O_NONBLOCK; |
filp | 78 | fs/ioctl.c | filp->f_flags &= ~O_NONBLOCK; |
filp | 85 | fs/ioctl.c | filp->f_flags |= O_SYNC; |
filp | 87 | fs/ioctl.c | filp->f_flags &= ~O_SYNC; |
filp | 91 | fs/ioctl.c | if (filp->f_inode && S_ISREG(filp->f_inode->i_mode)) |
filp | 92 | fs/ioctl.c | return file_ioctl(filp,cmd,arg); |
filp | 94 | fs/ioctl.c | if (filp->f_op && filp->f_op->ioctl) |
filp | 95 | fs/ioctl.c | return filp->f_op->ioctl(filp->f_inode, filp, cmd,arg); |
filp | 66 | fs/isofs/dir.c | static int isofs_readdir(struct inode * inode, struct file * filp, |
filp | 84 | fs/isofs/dir.c | offset = filp->f_pos & (bufsize - 1); |
filp | 85 | fs/isofs/dir.c | block = isofs_bmap(inode,filp->f_pos>>bufbits); |
filp | 89 | fs/isofs/dir.c | if(!(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, inode->i_size))) |
filp | 92 | fs/isofs/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 95 | fs/isofs/dir.c | block, offset, filp->f_pos); |
filp | 107 | fs/isofs/dir.c | filp->f_pos = ((filp->f_pos & ~(ISOFS_BLOCK_SIZE - 1)) |
filp | 109 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>>bufbits); |
filp | 111 | fs/isofs/dir.c | || !(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, |
filp | 124 | fs/isofs/dir.c | filp->f_pos += *((unsigned char *) de); |
filp | 132 | fs/isofs/dir.c | offset = filp->f_pos & (bufsize - 1); |
filp | 133 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>> bufbits); |
filp | 136 | fs/isofs/dir.c | filp->f_pos, inode->i_size))) { |
filp | 114 | fs/isofs/file.c | static int isofs_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 134 | fs/isofs/file.c | if (filp->f_pos > inode->i_size) |
filp | 137 | fs/isofs/file.c | left = inode->i_size - filp->f_pos; |
filp | 143 | fs/isofs/file.c | block = filp->f_pos >> ISOFS_BUFFER_BITS(inode); |
filp | 144 | fs/isofs/file.c | offset = filp->f_pos & (ISOFS_BUFFER_SIZE(inode)-1); |
filp | 207 | fs/isofs/file.c | filp->f_pos += chars; |
filp | 236 | fs/isofs/file.c | filp->f_reada = 1; |
filp | 25 | fs/locks.c | static int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l, |
filp | 29 | fs/locks.c | static int lock_it(struct file *filp, struct file_lock *caller, unsigned int fd); |
filp | 58 | fs/locks.c | struct file *filp; |
filp | 61 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) |
filp | 69 | fs/locks.c | if (!copy_flock(filp, &file_lock, &flock, fd)) |
filp | 72 | fs/locks.c | for (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) { |
filp | 97 | fs/locks.c | struct file *filp; |
filp | 105 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) |
filp | 111 | fs/locks.c | if (!copy_flock(filp, &file_lock, &flock, fd)) |
filp | 115 | fs/locks.c | if (!(filp->f_mode & 1)) |
filp | 119 | fs/locks.c | if (!(filp->f_mode & 2)) |
filp | 123 | fs/locks.c | if (!(filp->f_mode & 3)) |
filp | 128 | fs/locks.c | if (!(filp->f_mode & 3)) |
filp | 142 | fs/locks.c | for (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) { |
filp | 166 | fs/locks.c | return lock_it(filp, &file_lock, fd); |
filp | 173 | fs/locks.c | void fcntl_remove_locks(struct task_struct *task, struct file *filp, |
filp | 181 | fs/locks.c | before = &filp->f_inode->i_flock; |
filp | 196 | fs/locks.c | static int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l, |
filp | 201 | fs/locks.c | if (!filp->f_inode) /* just in case */ |
filp | 203 | fs/locks.c | if (!S_ISREG(filp->f_inode->i_mode)) |
filp | 210 | fs/locks.c | case 1 /*SEEK_CUR*/ : start = filp->f_pos; break; |
filp | 211 | fs/locks.c | case 2 /*SEEK_END*/ : start = filp->f_inode->i_size; break; |
filp | 272 | fs/locks.c | static int lock_it(struct file *filp, struct file_lock *caller, unsigned int fd) |
filp | 284 | fs/locks.c | before = &filp->f_inode->i_flock; |
filp | 16 | fs/minix/dir.c | static int minix_dir_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 57 | fs/minix/dir.c | static int minix_readdir(struct inode * inode, struct file * filp, |
filp | 69 | fs/minix/dir.c | if (filp->f_pos & (info->s_dirsize - 1)) |
filp | 71 | fs/minix/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 72 | fs/minix/dir.c | offset = filp->f_pos & 1023; |
filp | 73 | fs/minix/dir.c | bh = minix_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
filp | 75 | fs/minix/dir.c | filp->f_pos += 1024-offset; |
filp | 78 | fs/minix/dir.c | while (offset < 1024 && filp->f_pos < inode->i_size) { |
filp | 81 | fs/minix/dir.c | filp->f_pos += info->s_dirsize; |
filp | 66 | fs/minix/file.c | static int minix_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 84 | fs/minix/file.c | offset = filp->f_pos; |
filp | 100 | fs/minix/file.c | if (filp->f_reada) { |
filp | 158 | fs/minix/file.c | filp->f_pos += chars; |
filp | 183 | fs/minix/file.c | filp->f_reada = 1; |
filp | 189 | fs/minix/file.c | static int minix_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 205 | fs/minix/file.c | if (filp->f_flags & O_APPEND) |
filp | 208 | fs/minix/file.c | pos = filp->f_pos; |
filp | 243 | fs/minix/file.c | filp->f_pos = pos; |
filp | 17 | fs/msdos/dir.c | static int msdos_dir_read(struct inode * inode,struct file * filp, char * buf,int count) |
filp | 22 | fs/msdos/dir.c | static int msdos_readdir(struct inode *inode,struct file *filp, |
filp | 57 | fs/msdos/dir.c | static int msdos_readdir(struct inode *inode,struct file *filp, |
filp | 68 | fs/msdos/dir.c | if (filp->f_pos == 2) filp->f_pos = 0; |
filp | 69 | fs/msdos/dir.c | else if (filp->f_pos < 2) { |
filp | 70 | fs/msdos/dir.c | walk = filp->f_pos++ ? ".." : "."; |
filp | 79 | fs/msdos/dir.c | if (filp->f_pos & (sizeof(struct msdos_dir_entry)-1)) return -ENOENT; |
filp | 81 | 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 | 80 | fs/msdos/file.c | static int msdos_file_read(struct inode *inode,struct file *filp,char *buf, |
filp | 98 | fs/msdos/file.c | if (filp->f_pos >= inode->i_size || count <= 0) return 0; |
filp | 100 | fs/msdos/file.c | while ((left = MIN(inode->i_size-filp->f_pos,count-(buf-start))) > 0){ |
filp | 101 | fs/msdos/file.c | if (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
filp | 103 | fs/msdos/file.c | offset = filp->f_pos & (SECTOR_SIZE-1); |
filp | 105 | fs/msdos/file.c | filp->f_pos += (size = MIN(SECTOR_SIZE-offset,left)); |
filp | 116 | fs/msdos/file.c | filp->f_pos = inode->i_size; |
filp | 135 | fs/msdos/file.c | static int msdos_file_write(struct inode *inode,struct file *filp,char *buf, |
filp | 156 | fs/msdos/file.c | if (filp->f_flags & O_APPEND) filp->f_pos = inode->i_size; |
filp | 160 | fs/msdos/file.c | while (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
filp | 166 | fs/msdos/file.c | offset = filp->f_pos & (SECTOR_SIZE-1); |
filp | 173 | fs/msdos/file.c | memcpy_fromfs(data+(filp->f_pos & (SECTOR_SIZE-1)), |
filp | 179 | fs/msdos/file.c | to = (char *) data+(filp->f_pos & (SECTOR_SIZE-1)); |
filp | 198 | fs/msdos/file.c | filp->f_pos += written; |
filp | 199 | fs/msdos/file.c | if (filp->f_pos > inode->i_size) { |
filp | 200 | fs/msdos/file.c | inode->i_size = filp->f_pos; |
filp | 21 | fs/nfs/dir.c | static int nfs_dir_read(struct inode *, struct file *filp, char *buf, |
filp | 72 | fs/nfs/dir.c | static int nfs_dir_read(struct inode *inode, struct file *filp, char *buf, |
filp | 86 | fs/nfs/dir.c | static int nfs_readdir(struct inode *inode, struct file *filp, |
filp | 119 | fs/nfs/dir.c | if (filp->f_pos == c_entry[i].cookie) { |
filp | 135 | fs/nfs/dir.c | filp->f_pos, NFS_READDIR_CACHE_SIZE, c_entry); |
filp | 155 | fs/nfs/dir.c | filp->f_pos = entry->cookie; |
filp | 21 | fs/nfs/inode.c | extern int close_fp(struct file *filp, unsigned int fd); |
filp | 67 | fs/nfs/inode.c | struct file *filp; |
filp | 80 | fs/nfs/inode.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) { |
filp | 85 | fs/nfs/inode.c | if (!S_ISSOCK(filp->f_inode->i_mode)) { |
filp | 90 | fs/nfs/inode.c | filp->f_count++; |
filp | 98 | fs/nfs/inode.c | server->file = filp; |
filp | 442 | fs/open.c | int close_fp(struct file *filp, unsigned int fd) |
filp | 446 | fs/open.c | if (filp->f_count == 0) { |
filp | 450 | fs/open.c | inode = filp->f_inode; |
filp | 452 | fs/open.c | fcntl_remove_locks(current, filp, fd); |
filp | 453 | fs/open.c | if (filp->f_count > 1) { |
filp | 454 | fs/open.c | filp->f_count--; |
filp | 457 | fs/open.c | if (filp->f_op && filp->f_op->release) |
filp | 458 | fs/open.c | filp->f_op->release(inode,filp); |
filp | 459 | fs/open.c | filp->f_count--; |
filp | 460 | fs/open.c | filp->f_inode = NULL; |
filp | 467 | fs/open.c | struct file * filp; |
filp | 472 | fs/open.c | if (!(filp = current->files->fd[fd])) |
filp | 475 | fs/open.c | return (close_fp (filp, fd)); |
filp | 24 | fs/pipe.c | static int pipe_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 29 | fs/pipe.c | if (filp->f_flags & O_NONBLOCK) { |
filp | 71 | fs/pipe.c | static int pipe_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 93 | fs/pipe.c | if (filp->f_flags & O_NONBLOCK) |
filp | 128 | fs/pipe.c | static int bad_pipe_rw(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 133 | fs/pipe.c | static int pipe_ioctl(struct inode *pino, struct file * filp, |
filp | 149 | fs/pipe.c | static int pipe_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 175 | fs/pipe.c | static int fifo_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 202 | fs/pipe.c | static int connect_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 207 | fs/pipe.c | if (filp->f_flags & O_NONBLOCK) |
filp | 214 | fs/pipe.c | filp->f_op = &read_fifo_fops; |
filp | 215 | fs/pipe.c | return pipe_read(inode,filp,buf,count); |
filp | 218 | fs/pipe.c | static int connect_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 223 | fs/pipe.c | filp->f_op = &read_fifo_fops; |
filp | 246 | fs/pipe.c | static void pipe_read_release(struct inode * inode, struct file * filp) |
filp | 252 | fs/pipe.c | static void pipe_write_release(struct inode * inode, struct file * filp) |
filp | 258 | fs/pipe.c | static void pipe_rdwr_release(struct inode * inode, struct file * filp) |
filp | 132 | fs/proc/base.c | static int proc_readbase(struct inode * inode, struct file * filp, |
filp | 148 | fs/proc/base.c | if (((unsigned) filp->f_pos) < NR_BASE_DIRENTRY) { |
filp | 149 | fs/proc/base.c | de = base_dir + filp->f_pos; |
filp | 150 | fs/proc/base.c | filp->f_pos++; |
filp | 126 | fs/proc/fd.c | static int proc_readfd(struct inode * inode, struct file * filp, |
filp | 142 | fs/proc/fd.c | fd = filp->f_pos; |
filp | 143 | fs/proc/fd.c | filp->f_pos++; |
filp | 166 | fs/proc/net.c | static int proc_readnetdir(struct inode * inode, struct file * filp, |
filp | 176 | fs/proc/net.c | if (((unsigned) filp->f_pos) < NR_NET_DIRENTRY) { |
filp | 177 | fs/proc/net.c | de = net_dir + filp->f_pos; |
filp | 178 | fs/proc/net.c | filp->f_pos++; |
filp | 133 | fs/proc/root.c | static int proc_readroot(struct inode * inode, struct file * filp, |
filp | 143 | fs/proc/root.c | nr = filp->f_pos; |
filp | 147 | fs/proc/root.c | filp->f_pos++; |
filp | 160 | fs/proc/root.c | filp->f_pos++; |
filp | 23 | fs/sysv/dir.c | static int sysv_dir_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 64 | fs/sysv/dir.c | static int sysv_readdir(struct inode * inode, struct file * filp, |
filp | 76 | fs/sysv/dir.c | if ((unsigned long)(filp->f_pos) % SYSV_DIRSIZE) |
filp | 78 | fs/sysv/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 79 | fs/sysv/dir.c | offset = filp->f_pos & sb->sv_block_size_1; |
filp | 80 | fs/sysv/dir.c | bh = sysv_file_bread(inode, filp->f_pos >> sb->sv_block_size_bits, 0, &bh_data); |
filp | 82 | fs/sysv/dir.c | filp->f_pos += sb->sv_block_size - offset; |
filp | 85 | fs/sysv/dir.c | while (offset < sb->sv_block_size && filp->f_pos < inode->i_size) { |
filp | 88 | fs/sysv/dir.c | filp->f_pos += SYSV_DIRSIZE; |
filp | 98 | fs/sysv/dir.c | inode->i_dev, inode->i_ino, filp->f_pos - SYSV_DIRSIZE, de->inode); |
filp | 109 | fs/sysv/file.c | static int sysv_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 129 | fs/sysv/file.c | offset = filp->f_pos; |
filp | 145 | fs/sysv/file.c | if (filp->f_reada) { |
filp | 211 | fs/sysv/file.c | filp->f_pos += chars; |
filp | 236 | fs/sysv/file.c | filp->f_reada = 1; |
filp | 242 | fs/sysv/file.c | static int sysv_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 268 | fs/sysv/file.c | if (filp->f_flags & O_APPEND) |
filp | 271 | fs/sysv/file.c | pos = filp->f_pos; |
filp | 308 | fs/sysv/file.c | filp->f_pos = pos; |
filp | 60 | fs/xiafs/dir.c | struct file * filp, char * buf, int count) |
filp | 66 | fs/xiafs/dir.c | struct file * filp, struct dirent * dirent, int count) |
filp | 76 | fs/xiafs/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 77 | fs/xiafs/dir.c | offset = filp->f_pos & (XIAFS_ZSIZE(inode->i_sb) - 1); |
filp | 78 | fs/xiafs/dir.c | bh = xiafs_bread(inode, filp->f_pos >> XIAFS_ZSIZE_BITS(inode->i_sb),0); |
filp | 80 | fs/xiafs/dir.c | filp->f_pos += XIAFS_ZSIZE(inode->i_sb)-offset; |
filp | 84 | fs/xiafs/dir.c | while (offset < XIAFS_ZSIZE(inode->i_sb) && filp->f_pos < inode->i_size) { |
filp | 96 | fs/xiafs/dir.c | filp->f_pos += de->d_rec_len; |
filp | 70 | fs/xiafs/file.c | xiafs_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 87 | fs/xiafs/file.c | offset = filp->f_pos; |
filp | 99 | fs/xiafs/file.c | if (filp->f_reada) { |
filp | 156 | fs/xiafs/file.c | filp->f_pos += chars; |
filp | 181 | fs/xiafs/file.c | filp->f_reada = 1; |
filp | 190 | fs/xiafs/file.c | xiafs_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 209 | fs/xiafs/file.c | if (filp->f_flags & O_APPEND) |
filp | 212 | fs/xiafs/file.c | pos = filp->f_pos; |
filp | 248 | fs/xiafs/file.c | filp->f_pos = pos; |
filp | 62 | include/linux/ext_fs.h | extern int ext_open(struct inode * inode, struct file * filp); |
filp | 63 | include/linux/ext_fs.h | extern void ext_release(struct inode * inode, struct file * filp); |
filp | 348 | include/linux/fs.h | extern int blkdev_open(struct inode * inode, struct file * filp); |
filp | 354 | include/linux/fs.h | extern int chrdev_open(struct inode * inode, struct file * filp); |
filp | 167 | include/linux/iso_fs.h | extern int isofs_open(struct inode * inode, struct file * filp); |
filp | 168 | include/linux/iso_fs.h | extern void isofs_release(struct inode * inode, struct file * filp); |
filp | 293 | include/linux/tty.h | extern void tty_unhangup(struct file *filp); |
filp | 294 | include/linux/tty.h | extern int tty_hung_up_p(struct file * filp); |
filp | 307 | include/linux/tty.h | extern int rs_open(struct tty_struct * tty, struct file * filp); |
filp | 311 | include/linux/tty.h | extern int pty_open(struct tty_struct * tty, struct file * filp); |
filp | 315 | include/linux/tty.h | extern int con_open(struct tty_struct * tty, struct file * filp); |
filp | 117 | include/linux/tty_driver.h | int (*open)(struct tty_struct * tty, struct file * filp); |
filp | 118 | include/linux/tty_driver.h | void (*close)(struct tty_struct * tty, struct file * filp); |
filp | 747 | net/socket.c | sock_fcntl(struct file *filp, unsigned int cmd, unsigned long arg) |
filp | 751 | net/socket.c | sock = socki_lookup (filp->f_inode); |