Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 513) sorted by relevance

12345678910>>...21

/linux-2.6.39/fs/hfsplus/
Dbfind.c14 int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) in hfs_find_init() argument
18 fd->tree = tree; in hfs_find_init()
19 fd->bnode = NULL; in hfs_find_init()
23 fd->search_key = ptr; in hfs_find_init()
24 fd->key = ptr + tree->max_key_len + 2; in hfs_find_init()
31 void hfs_find_exit(struct hfs_find_data *fd) in hfs_find_exit() argument
33 hfs_bnode_put(fd->bnode); in hfs_find_exit()
34 kfree(fd->search_key); in hfs_find_exit()
36 fd->tree->cnid, __builtin_return_address(0)); in hfs_find_exit()
37 mutex_unlock(&fd->tree->tree_lock); in hfs_find_exit()
[all …]
Dbrec.c14 static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd);
15 static int hfs_brec_update_parent(struct hfs_find_data *fd);
57 int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len) in hfs_brec_insert() argument
66 tree = fd->tree; in hfs_brec_insert()
67 if (!fd->bnode) { in hfs_brec_insert()
70 fd->bnode = hfs_bnode_find(tree, tree->leaf_head); in hfs_brec_insert()
71 if (IS_ERR(fd->bnode)) in hfs_brec_insert()
72 return PTR_ERR(fd->bnode); in hfs_brec_insert()
73 fd->record = -1; in hfs_brec_insert()
76 key_len = be16_to_cpu(fd->search_key->key_len) + 2; in hfs_brec_insert()
[all …]
Dcatalog.c176 struct hfs_find_data *fd) in hfsplus_find_cat() argument
182 hfsplus_cat_build_key(sb, fd->search_key, cnid, NULL); in hfsplus_find_cat()
183 err = hfs_brec_read(fd, &tmp, sizeof(hfsplus_cat_entry)); in hfsplus_find_cat()
198 hfsplus_cat_build_key_uni(fd->search_key, in hfsplus_find_cat()
201 return hfs_brec_find(fd); in hfsplus_find_cat()
208 struct hfs_find_data fd; in hfsplus_create_cat() local
215 hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); in hfsplus_create_cat()
217 hfsplus_cat_build_key(sb, fd.search_key, cnid, NULL); in hfsplus_create_cat()
222 err = hfs_brec_find(&fd); in hfsplus_create_cat()
228 err = hfs_brec_insert(&fd, &entry, entry_size); in hfsplus_create_cat()
[all …]
/linux-2.6.39/fs/hfs/
Dbfind.c14 int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) in hfs_find_init() argument
18 fd->tree = tree; in hfs_find_init()
19 fd->bnode = NULL; in hfs_find_init()
23 fd->search_key = ptr; in hfs_find_init()
24 fd->key = ptr + tree->max_key_len + 2; in hfs_find_init()
30 void hfs_find_exit(struct hfs_find_data *fd) in hfs_find_exit() argument
32 hfs_bnode_put(fd->bnode); in hfs_find_exit()
33 kfree(fd->search_key); in hfs_find_exit()
34 dprint(DBG_BNODE_REFS, "find_exit: %d (%p)\n", fd->tree->cnid, __builtin_return_address(0)); in hfs_find_exit()
35 mutex_unlock(&fd->tree->tree_lock); in hfs_find_exit()
[all …]
Dbrec.c13 static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd);
14 static int hfs_brec_update_parent(struct hfs_find_data *fd);
66 int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len) in hfs_brec_insert() argument
75 tree = fd->tree; in hfs_brec_insert()
76 if (!fd->bnode) { in hfs_brec_insert()
79 fd->bnode = hfs_bnode_find(tree, tree->leaf_head); in hfs_brec_insert()
80 if (IS_ERR(fd->bnode)) in hfs_brec_insert()
81 return PTR_ERR(fd->bnode); in hfs_brec_insert()
82 fd->record = -1; in hfs_brec_insert()
85 key_len = (fd->search_key->key_len | 1) + 1; in hfs_brec_insert()
[all …]
Ddir.c24 struct hfs_find_data fd; in hfs_lookup() local
28 hfs_find_init(HFS_SB(dir->i_sb)->cat_tree, &fd); in hfs_lookup()
29 hfs_cat_build_key(dir->i_sb, fd.search_key, dir->i_ino, &dentry->d_name); in hfs_lookup()
30 res = hfs_brec_read(&fd, &rec, sizeof(rec)); in hfs_lookup()
32 hfs_find_exit(&fd); in hfs_lookup()
40 inode = hfs_iget(dir->i_sb, &fd.search_key->cat, &rec); in hfs_lookup()
41 hfs_find_exit(&fd); in hfs_lookup()
59 struct hfs_find_data fd; in hfs_readdir() local
66 hfs_find_init(HFS_SB(sb)->cat_tree, &fd); in hfs_readdir()
67 hfs_cat_build_key(sb, fd.search_key, inode->i_ino, NULL); in hfs_readdir()
[all …]
Dcatalog.c84 struct hfs_find_data fd; in hfs_cat_create() local
95 hfs_find_init(HFS_SB(sb)->cat_tree, &fd); in hfs_cat_create()
97 hfs_cat_build_key(sb, fd.search_key, cnid, NULL); in hfs_cat_create()
101 err = hfs_brec_find(&fd); in hfs_cat_create()
107 err = hfs_brec_insert(&fd, &entry, entry_size); in hfs_cat_create()
111 hfs_cat_build_key(sb, fd.search_key, dir->i_ino, str); in hfs_cat_create()
113 err = hfs_brec_find(&fd); in hfs_cat_create()
120 err = hfs_brec_insert(&fd, &entry, entry_size); in hfs_cat_create()
127 hfs_find_exit(&fd); in hfs_cat_create()
131 hfs_cat_build_key(sb, fd.search_key, cnid, NULL); in hfs_cat_create()
[all …]
Dattr.c20 struct hfs_find_data fd; in hfs_setxattr() local
28 res = hfs_find_init(HFS_SB(inode->i_sb)->cat_tree, &fd); in hfs_setxattr()
31 fd.search_key->cat = HFS_I(inode)->cat_key; in hfs_setxattr()
32 res = hfs_brec_find(&fd); in hfs_setxattr()
35 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_setxattr()
52 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_setxattr()
55 hfs_find_exit(&fd); in hfs_setxattr()
63 struct hfs_find_data fd; in hfs_getxattr() local
72 res = hfs_find_init(HFS_SB(inode->i_sb)->cat_tree, &fd); in hfs_getxattr()
75 fd.search_key->cat = HFS_I(inode)->cat_key; in hfs_getxattr()
[all …]
/linux-2.6.39/arch/um/os-Linux/
Dfile.c38 int os_stat_fd(const int fd, struct uml_stat *ubuf) in os_stat_fd() argument
43 CATCH_EINTR(err = fstat64(fd, &sbuf)); in os_stat_fd()
83 int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg) in os_ioctl_generic() argument
87 err = ioctl(fd, cmd, arg); in os_ioctl_generic()
95 int os_get_ifname(int fd, char* namebuf) in os_get_ifname() argument
97 if (ioctl(fd, SIOCGIFNAME, namebuf) < 0) in os_get_ifname()
103 int os_set_slip(int fd) in os_set_slip() argument
108 if (ioctl(fd, TIOCSETD, &disc) < 0) in os_set_slip()
112 if (ioctl(fd, SIOCSIFENCAP, &sencap) < 0) in os_set_slip()
118 int os_mode_fd(int fd, int mode) in os_mode_fd() argument
[all …]
Dmem.c63 static int next(int fd, char *buf, size_t size, char c) in next() argument
70 n = read(fd, buf, size - 1); in next()
87 n = read(fd, &buf[len], size - len - 1); in next()
111 int fd, found; in which_tmpdir() local
121 fd = open("/proc/mounts", O_RDONLY); in which_tmpdir()
122 if (fd < 0) { in which_tmpdir()
128 found = next(fd, buf, ARRAY_SIZE(buf), ' '); in which_tmpdir()
135 found = next(fd, buf, ARRAY_SIZE(buf), '\n'); in which_tmpdir()
147 close(fd); in which_tmpdir()
152 found = next(fd, buf, ARRAY_SIZE(buf), ' '); in which_tmpdir()
[all …]
Dirq.c48 pollfds[i].fd = -1; in os_waiting_for_events()
55 int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) in os_create_pollfd() argument
74 pollfds[pollfds_num] = ((struct pollfd) { .fd = fd, in os_create_pollfd()
92 if ((pollfds[i].fd != -1) && in os_free_irq_by_cb()
93 (pollfds[i].fd != (*prev)->fd)) { in os_free_irq_by_cb()
97 (*prev)->fd, pollfds[i].fd); in os_free_irq_by_cb()
114 ignore_sigio_fd(old_fd->fd); in os_free_irq_by_cb()
127 return pollfds[i].fd; in os_get_pollfd()
130 void os_set_pollfd(int i, int fd) in os_set_pollfd() argument
132 pollfds[i].fd = fd; in os_set_pollfd()
/linux-2.6.39/Documentation/timers/
Dhpet_example.c81 int fd; in hpet_open_close() local
88 fd = open(argv[0], O_RDONLY); in hpet_open_close()
89 if (fd < 0) in hpet_open_close()
92 close(fd); in hpet_open_close()
101 int fd; in hpet_info() local
108 fd = open(argv[0], O_RDONLY); in hpet_info()
109 if (fd < 0) { in hpet_info()
114 if (ioctl(fd, HPET_INFO, &info) < 0) { in hpet_info()
125 close(fd); in hpet_info()
133 int iterations, i, fd; in hpet_poll() local
[all …]
/linux-2.6.39/fs/jffs2/
Dbuild.c52 struct jffs2_full_dirent *fd; in jffs2_build_inode_pass1() local
57 for(fd = ic->scan_dents; fd; fd = fd->next) { in jffs2_build_inode_pass1()
59 if (!fd->ino) in jffs2_build_inode_pass1()
64 child_ic = jffs2_get_ino_cache(c, fd->ino); in jffs2_build_inode_pass1()
67 fd->name, fd->ino, ic->ino); in jffs2_build_inode_pass1()
68 jffs2_mark_node_obsolete(c, fd->raw); in jffs2_build_inode_pass1()
72 if (fd->type == DT_DIR) { in jffs2_build_inode_pass1()
75 fd->name, fd->ino, ic->ino); in jffs2_build_inode_pass1()
83 dbg_fsbuild("increased nlink for child \"%s\" (ino #%u)\n", fd->name, fd->ino); in jffs2_build_inode_pass1()
98 struct jffs2_full_dirent *fd; in jffs2_build_filesystem() local
[all …]
/linux-2.6.39/arch/um/drivers/
Dport_kern.c24 int fd; member
38 int fd; member
48 int fd; in pipe_interrupt() local
50 fd = os_rcv_fd(conn->socket[0], &conn->helper_pid); in pipe_interrupt()
51 if (fd < 0) { in pipe_interrupt()
52 if (fd == -EAGAIN) in pipe_interrupt()
56 -fd); in pipe_interrupt()
57 os_close_file(conn->fd); in pipe_interrupt()
62 conn->fd = fd; in pipe_interrupt()
79 int fd, socket[2], pid; in port_accept() local
[all …]
Dchan_user.c19 void generic_close(int fd, void *unused) in generic_close() argument
21 close(fd); in generic_close()
24 int generic_read(int fd, char *c_out, void *unused) in generic_read() argument
28 n = read(fd, c_out, sizeof(*c_out)); in generic_read()
40 int generic_write(int fd, const char *buf, int n, void *unused) in generic_write() argument
44 err = write(fd, buf, n); in generic_write()
54 int generic_window_size(int fd, void *unused, unsigned short *rows_out, in generic_window_size() argument
60 if (ioctl(fd, TIOCGWINSZ, &size) < 0) in generic_window_size()
76 int generic_console_write(int fd, const char *buf, int n) in generic_console_write() argument
82 if (isatty(fd)) { in generic_console_write()
[all …]
Dport_user.c76 int fd, err; in port_open() local
78 fd = port_wait(data->kernel_data); in port_open()
79 if ((fd >= 0) && data->raw) { in port_open()
80 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); in port_open()
84 err = raw(fd); in port_open()
89 return fd; in port_open()
92 static void port_close(int fd, void *d) in port_close() argument
97 os_close_file(fd); in port_close()
116 int fd, err, arg; in port_listen_fd() local
118 fd = socket(PF_INET, SOCK_STREAM, 0); in port_listen_fd()
[all …]
/linux-2.6.39/fs/hostfs/
Dhostfs_user.c42 int stat_file(const char *path, struct hostfs_stat *p, int fd) in stat_file() argument
46 if (fd >= 0) { in stat_file()
47 if (fstat64(fd, &buf) < 0) in stat_file()
73 int mode = 0, fd; in open_file() local
85 fd = open64(path, mode); in open_file()
86 if (fd < 0) in open_file()
88 else return fd; in open_file()
117 int read_file(int fd, unsigned long long *offset, char *buf, int len) in read_file() argument
121 n = pread64(fd, buf, len, *offset); in read_file()
128 int write_file(int fd, unsigned long long *offset, const char *buf, int len) in write_file() argument
[all …]
/linux-2.6.39/arch/um/kernel/
Dirq.c63 static int activate_fd(int irq, int fd, int type, void *dev_id) in activate_fd() argument
70 err = os_set_fd_async(fd); in activate_fd()
84 .fd = fd, in activate_fd()
93 if ((irq_fd->fd == fd) && (irq_fd->type == type)) { in activate_fd()
94 printk(KERN_ERR "Registering fd %d twice\n", fd); in activate_fd()
103 fd = -1; in activate_fd()
109 n = os_create_pollfd(fd, events, tmp_pfd, n); in activate_fd()
144 maybe_sigio_broken(fd, (type == IRQ_READ)); in activate_fd()
185 static int same_fd(struct irq_fd *irq, void *fd) in same_fd() argument
187 return (irq->fd == *((int *)fd)); in same_fd()
[all …]
/linux-2.6.39/tools/perf/scripts/perl/
Drw-by-file.pl31 $common_pid, $common_comm, $nr, $fd, $buf, $count) = @_;
34 $reads{$fd}{bytes_requested} += $count;
35 $reads{$fd}{total_reads}++;
42 $common_pid, $common_comm, $nr, $fd, $buf, $count) = @_;
45 $writes{$fd}{bytes_written} += $count;
46 $writes{$fd}{total_writes}++;
57 foreach my $fd (sort {$reads{$b}{bytes_requested} <=>
59 my $total_reads = $reads{$fd}{total_reads};
60 my $bytes_requested = $reads{$fd}{bytes_requested};
61 printf("%6u %10u %10u\n", $fd, $total_reads, $bytes_requested);
[all …]
/linux-2.6.39/Documentation/spi/
Dspidev_fdx.c17 static void do_read(int fd, int len) in do_read() argument
29 status = read(fd, buf, len); in do_read()
48 static void do_msg(int fd, int len) in do_msg() argument
67 status = ioctl(fd, SPI_IOC_MESSAGE(2), xfer); in do_msg()
79 static void dumpstat(const char *name, int fd) in dumpstat() argument
84 if (ioctl(fd, SPI_IOC_RD_MODE, &mode) < 0) { in dumpstat()
88 if (ioctl(fd, SPI_IOC_RD_LSB_FIRST, &lsb) < 0) { in dumpstat()
92 if (ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits) < 0) { in dumpstat()
96 if (ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &speed) < 0) { in dumpstat()
110 int fd; in main() local
[all …]
/linux-2.6.39/arch/um/include/shared/
Dos.h127 extern int os_stat_fd(const int fd, struct uml_stat *buf);
129 extern int os_set_exec_close(int fd);
130 extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg);
131 extern int os_get_ifname(int fd, char *namebuf);
132 extern int os_set_slip(int fd);
133 extern int os_mode_fd(int fd, int mode);
135 extern int os_seek_file(int fd, unsigned long long offset);
137 extern int os_read_file(int fd, void *buf, int len);
138 extern int os_write_file(int fd, const void *buf, int count);
141 extern int os_pipe(int *fd, int stream, int close_on_exec);
[all …]
/linux-2.6.39/arch/parisc/kernel/
Dsys_parisc.c114 unsigned long prot, unsigned long flags, unsigned long fd, in sys_mmap2() argument
119 return sys_mmap_pgoff(addr, len, prot, flags, fd, in sys_mmap2()
124 unsigned long prot, unsigned long flags, unsigned long fd, in sys_mmap() argument
128 return sys_mmap_pgoff(addr, len, prot, flags, fd, in sys_mmap()
144 asmlinkage long parisc_ftruncate64(unsigned int fd, in parisc_ftruncate64() argument
147 return sys_ftruncate(fd, (long)high << 32 | low); in parisc_ftruncate64()
156 asmlinkage long sys_ftruncate64(unsigned int fd, unsigned long length) in sys_ftruncate64() argument
158 return sys_ftruncate(fd, length); in sys_ftruncate64()
160 asmlinkage long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) in sys_fcntl64() argument
162 return sys_fcntl(fd, cmd, arg); in sys_fcntl64()
[all …]
/linux-2.6.39/arch/sh/kernel/
Dsmp.c398 struct flush_tlb_data *fd = (struct flush_tlb_data *)info; in flush_tlb_range_ipi() local
400 local_flush_tlb_range(fd->vma, fd->addr1, fd->addr2); in flush_tlb_range_ipi()
410 struct flush_tlb_data fd; in flush_tlb_range() local
412 fd.vma = vma; in flush_tlb_range()
413 fd.addr1 = start; in flush_tlb_range()
414 fd.addr2 = end; in flush_tlb_range()
415 smp_call_function(flush_tlb_range_ipi, (void *)&fd, 1); in flush_tlb_range()
428 struct flush_tlb_data *fd = (struct flush_tlb_data *)info; in flush_tlb_kernel_range_ipi() local
430 local_flush_tlb_kernel_range(fd->addr1, fd->addr2); in flush_tlb_kernel_range_ipi()
435 struct flush_tlb_data fd; in flush_tlb_kernel_range() local
[all …]
/linux-2.6.39/Documentation/usb/
Dgadget_printer.txt195 struct pollfd fd[1];
198 fd[0].fd = open(PRINTER_FILE, O_RDWR);
199 if (fd[0].fd < 0) {
200 printf("Error %d opening %s\n", fd[0].fd, PRINTER_FILE);
201 close(fd[0].fd);
205 fd[0].events = POLLIN | POLLRDNORM;
213 retval = poll(fd, 1, 1000);
215 if (retval && (fd[0].revents & POLLRDNORM)) {
218 bytes_read = read(fd[0].fd, buf, BUF_SIZE);
222 fd[0].fd, PRINTER_FILE);
[all …]
/linux-2.6.39/drivers/net/wimax/i2400m/
Ddebugfs.c253 struct dentry *fd; in i2400m_debugfs_add() local
272 fd = debugfs_create_size_t("tx_in", 0400, dentry, in i2400m_debugfs_add()
274 result = PTR_ERR(fd); in i2400m_debugfs_add()
275 if (IS_ERR(fd) && result != -ENODEV) { in i2400m_debugfs_add()
281 fd = debugfs_create_size_t("tx_out", 0400, dentry, in i2400m_debugfs_add()
283 result = PTR_ERR(fd); in i2400m_debugfs_add()
284 if (IS_ERR(fd) && result != -ENODEV) { in i2400m_debugfs_add()
290 fd = debugfs_create_u32("state", 0600, dentry, in i2400m_debugfs_add()
292 result = PTR_ERR(fd); in i2400m_debugfs_add()
293 if (IS_ERR(fd) && result != -ENODEV) { in i2400m_debugfs_add()
[all …]

12345678910>>...21