/linux-4.4.14/tools/testing/selftests/memfd/ |
D | memfd_test.c | 32 int r, fd; in mfd_assert_new() local 34 fd = sys_memfd_create(name, flags); in mfd_assert_new() 35 if (fd < 0) { in mfd_assert_new() 41 r = ftruncate(fd, sz); in mfd_assert_new() 47 return fd; in mfd_assert_new() 63 static unsigned int mfd_assert_get_seals(int fd) in mfd_assert_get_seals() argument 67 r = fcntl(fd, F_GET_SEALS); in mfd_assert_get_seals() 69 printf("GET_SEALS(%d) failed: %m\n", fd); in mfd_assert_get_seals() 76 static void mfd_assert_has_seals(int fd, unsigned int seals) in mfd_assert_has_seals() argument 80 s = mfd_assert_get_seals(fd); in mfd_assert_has_seals() [all …]
|
D | fuse_test.c | 46 int r, fd; in mfd_assert_new() local 48 fd = sys_memfd_create(name, flags); in mfd_assert_new() 49 if (fd < 0) { in mfd_assert_new() 55 r = ftruncate(fd, sz); in mfd_assert_new() 61 return fd; in mfd_assert_new() 64 static __u64 mfd_assert_get_seals(int fd) in mfd_assert_get_seals() argument 68 r = fcntl(fd, F_GET_SEALS); in mfd_assert_get_seals() 70 printf("GET_SEALS(%d) failed: %m\n", fd); in mfd_assert_get_seals() 77 static void mfd_assert_has_seals(int fd, __u64 seals) in mfd_assert_has_seals() argument 81 s = mfd_assert_get_seals(fd); in mfd_assert_has_seals() [all …]
|
/linux-4.4.14/drivers/clk/ |
D | clk-fractional-divider.c | 24 struct clk_fractional_divider *fd = to_clk_fd(hw); in clk_fd_recalc_rate() local 30 if (fd->lock) in clk_fd_recalc_rate() 31 spin_lock_irqsave(fd->lock, flags); in clk_fd_recalc_rate() 33 __acquire(fd->lock); in clk_fd_recalc_rate() 35 val = clk_readl(fd->reg); in clk_fd_recalc_rate() 37 if (fd->lock) in clk_fd_recalc_rate() 38 spin_unlock_irqrestore(fd->lock, flags); in clk_fd_recalc_rate() 40 __release(fd->lock); in clk_fd_recalc_rate() 42 m = (val & fd->mmask) >> fd->mshift; in clk_fd_recalc_rate() 43 n = (val & fd->nmask) >> fd->nshift; in clk_fd_recalc_rate() [all …]
|
/linux-4.4.14/fs/hfsplus/ |
D | bfind.c | 14 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() 43 void hfs_find_exit(struct hfs_find_data *fd) in hfs_find_exit() argument 45 hfs_bnode_put(fd->bnode); in hfs_find_exit() 46 kfree(fd->search_key); in hfs_find_exit() 48 fd->tree->cnid, __builtin_return_address(0)); in hfs_find_exit() 49 mutex_unlock(&fd->tree->tree_lock); in hfs_find_exit() [all …]
|
D | brec.c | 14 static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd); 15 static int hfs_brec_update_parent(struct hfs_find_data *fd); 62 int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len) in hfs_brec_insert() argument 71 tree = fd->tree; in hfs_brec_insert() 72 if (!fd->bnode) { in hfs_brec_insert() 75 fd->bnode = hfs_bnode_find(tree, tree->leaf_head); in hfs_brec_insert() 76 if (IS_ERR(fd->bnode)) in hfs_brec_insert() 77 return PTR_ERR(fd->bnode); in hfs_brec_insert() 78 fd->record = -1; in hfs_brec_insert() 81 key_len = be16_to_cpu(fd->search_key->key_len) + 2; in hfs_brec_insert() [all …]
|
D | attributes.c | 137 const char *name, struct hfs_find_data *fd) in hfsplus_find_attr() argument 149 err = hfsplus_attr_build_key(sb, fd->search_key, cnid, name); in hfsplus_find_attr() 152 err = hfs_brec_find(fd, hfs_find_rec_by_key); in hfsplus_find_attr() 156 err = hfsplus_attr_build_key(sb, fd->search_key, cnid, NULL); in hfsplus_find_attr() 159 err = hfs_brec_find(fd, hfs_find_1st_rec_by_cnid); in hfsplus_find_attr() 172 struct hfs_find_data fd; in hfsplus_attr_exists() local 177 err = hfs_find_init(HFSPLUS_SB(sb)->attr_tree, &fd); in hfsplus_attr_exists() 181 err = hfsplus_find_attr(sb, inode->i_ino, name, &fd); in hfsplus_attr_exists() 185 hfs_find_exit(&fd); in hfsplus_attr_exists() 189 hfs_find_exit(&fd); in hfsplus_attr_exists() [all …]
|
D | catalog.c | 194 struct hfs_find_data *fd) in hfsplus_find_cat() argument 200 hfsplus_cat_build_key_with_cnid(sb, fd->search_key, cnid); in hfsplus_find_cat() 201 err = hfs_brec_read(fd, &tmp, sizeof(hfsplus_cat_entry)); in hfsplus_find_cat() 216 hfsplus_cat_build_key_uni(fd->search_key, in hfsplus_find_cat() 219 return hfs_brec_find(fd, hfs_find_rec_by_key); in hfsplus_find_cat() 256 struct hfs_find_data fd; in hfsplus_create_cat() local 263 err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); in hfsplus_create_cat() 267 hfsplus_cat_build_key_with_cnid(sb, fd.search_key, cnid); in hfsplus_create_cat() 277 err = hfs_brec_find(&fd, hfs_find_rec_by_key); in hfsplus_create_cat() 283 err = hfs_brec_insert(&fd, &entry, entry_size); in hfsplus_create_cat() [all …]
|
D | extents.c | 87 struct hfs_find_data *fd) in __hfsplus_ext_write_extent() argument 94 hfsplus_ext_build_key(fd->search_key, inode->i_ino, hip->cached_start, in __hfsplus_ext_write_extent() 98 res = hfs_brec_find(fd, hfs_find_rec_by_key); in __hfsplus_ext_write_extent() 102 hfs_brec_insert(fd, hip->cached_extents, in __hfsplus_ext_write_extent() 108 hfs_bnode_write(fd->bnode, hip->cached_extents, in __hfsplus_ext_write_extent() 109 fd->entryoffset, fd->entrylength); in __hfsplus_ext_write_extent() 129 struct hfs_find_data fd; in hfsplus_ext_write_extent_locked() local 131 res = hfs_find_init(HFSPLUS_SB(inode->i_sb)->ext_tree, &fd); in hfsplus_ext_write_extent_locked() 134 res = __hfsplus_ext_write_extent(inode, &fd); in hfsplus_ext_write_extent_locked() 135 hfs_find_exit(&fd); in hfsplus_ext_write_extent_locked() [all …]
|
D | dir.c | 34 struct hfs_find_data fd; in hfsplus_lookup() local 44 err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); in hfsplus_lookup() 47 err = hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, in hfsplus_lookup() 52 err = hfs_brec_read(&fd, &entry, sizeof(entry)); in hfsplus_lookup() 55 hfs_find_exit(&fd); in hfsplus_lookup() 64 if (fd.entrylength < sizeof(struct hfsplus_cat_folder)) { in hfsplus_lookup() 71 if (fd.entrylength < sizeof(struct hfsplus_cat_file)) { in hfsplus_lookup() 103 err = hfsplus_cat_build_key(sb, fd.search_key, in hfsplus_lookup() 117 hfs_find_exit(&fd); in hfsplus_lookup() 127 hfs_find_exit(&fd); in hfsplus_lookup() [all …]
|
D | xattr.c | 453 struct hfs_find_data fd; in hfsplus_getxattr_finder_info() local 462 res = hfs_find_init(HFSPLUS_SB(inode->i_sb)->cat_tree, &fd); in hfsplus_getxattr_finder_info() 467 res = hfsplus_find_cat(inode->i_sb, inode->i_ino, &fd); in hfsplus_getxattr_finder_info() 470 entry_type = hfs_bnode_read_u16(fd.bnode, fd.entryoffset); in hfsplus_getxattr_finder_info() 473 hfs_bnode_read(fd.bnode, folder_finder_info, in hfsplus_getxattr_finder_info() 474 fd.entryoffset + in hfsplus_getxattr_finder_info() 480 hfs_bnode_read(fd.bnode, file_finder_info, in hfsplus_getxattr_finder_info() 481 fd.entryoffset + in hfsplus_getxattr_finder_info() 495 hfs_find_exit(&fd); in hfsplus_getxattr_finder_info() 502 struct hfs_find_data fd; in __hfsplus_getxattr() local [all …]
|
D | inode.c | 478 int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) in hfsplus_cat_read_inode() argument 484 type = hfs_bnode_read_u16(fd->bnode, fd->entryoffset); in hfsplus_cat_read_inode() 490 if (fd->entrylength < sizeof(struct hfsplus_cat_folder)) in hfsplus_cat_read_inode() 492 hfs_bnode_read(fd->bnode, &entry, fd->entryoffset, in hfsplus_cat_read_inode() 511 if (fd->entrylength < sizeof(struct hfsplus_cat_file)) in hfsplus_cat_read_inode() 513 hfs_bnode_read(fd->bnode, &entry, fd->entryoffset, in hfsplus_cat_read_inode() 548 struct hfs_find_data fd; in hfsplus_cat_write_inode() local 557 if (hfs_find_init(HFSPLUS_SB(main_inode->i_sb)->cat_tree, &fd)) in hfsplus_cat_write_inode() 561 if (hfsplus_find_cat(main_inode->i_sb, main_inode->i_ino, &fd)) in hfsplus_cat_write_inode() 568 if (fd.entrylength < sizeof(struct hfsplus_cat_folder)) in hfsplus_cat_write_inode() [all …]
|
/linux-4.4.14/fs/hfs/ |
D | bfind.c | 14 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 …]
|
D | brec.c | 13 static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd); 14 static int hfs_brec_update_parent(struct hfs_find_data *fd); 64 int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len) in hfs_brec_insert() argument 73 tree = fd->tree; in hfs_brec_insert() 74 if (!fd->bnode) { in hfs_brec_insert() 77 fd->bnode = hfs_bnode_find(tree, tree->leaf_head); in hfs_brec_insert() 78 if (IS_ERR(fd->bnode)) in hfs_brec_insert() 79 return PTR_ERR(fd->bnode); in hfs_brec_insert() 80 fd->record = -1; in hfs_brec_insert() 83 key_len = (fd->search_key->key_len | 1) + 1; in hfs_brec_insert() [all …]
|
D | dir.c | 24 struct hfs_find_data fd; in hfs_lookup() local 28 res = hfs_find_init(HFS_SB(dir->i_sb)->cat_tree, &fd); in hfs_lookup() 31 hfs_cat_build_key(dir->i_sb, fd.search_key, dir->i_ino, &dentry->d_name); in hfs_lookup() 32 res = hfs_brec_read(&fd, &rec, sizeof(rec)); in hfs_lookup() 34 hfs_find_exit(&fd); in hfs_lookup() 42 inode = hfs_iget(dir->i_sb, &fd.search_key->cat, &rec); in hfs_lookup() 43 hfs_find_exit(&fd); in hfs_lookup() 61 struct hfs_find_data fd; in hfs_readdir() local 68 err = hfs_find_init(HFS_SB(sb)->cat_tree, &fd); in hfs_readdir() 71 hfs_cat_build_key(sb, fd.search_key, inode->i_ino, NULL); in hfs_readdir() [all …]
|
D | catalog.c | 84 struct hfs_find_data fd; in hfs_cat_create() local 96 err = hfs_find_init(HFS_SB(sb)->cat_tree, &fd); in hfs_cat_create() 100 hfs_cat_build_key(sb, fd.search_key, cnid, NULL); in hfs_cat_create() 104 err = hfs_brec_find(&fd); in hfs_cat_create() 110 err = hfs_brec_insert(&fd, &entry, entry_size); in hfs_cat_create() 114 hfs_cat_build_key(sb, fd.search_key, dir->i_ino, str); in hfs_cat_create() 116 err = hfs_brec_find(&fd); in hfs_cat_create() 123 err = hfs_brec_insert(&fd, &entry, entry_size); in hfs_cat_create() 130 hfs_find_exit(&fd); in hfs_cat_create() 134 hfs_cat_build_key(sb, fd.search_key, cnid, NULL); in hfs_cat_create() [all …]
|
D | attr.c | 20 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 …]
|
D | extent.c | 110 static int __hfs_ext_write_extent(struct inode *inode, struct hfs_find_data *fd) in __hfs_ext_write_extent() argument 114 hfs_ext_build_key(fd->search_key, inode->i_ino, HFS_I(inode)->cached_start, in __hfs_ext_write_extent() 116 res = hfs_brec_find(fd); in __hfs_ext_write_extent() 120 hfs_brec_insert(fd, HFS_I(inode)->cached_extents, sizeof(hfs_extent_rec)); in __hfs_ext_write_extent() 125 hfs_bnode_write(fd->bnode, HFS_I(inode)->cached_extents, fd->entryoffset, fd->entrylength); in __hfs_ext_write_extent() 133 struct hfs_find_data fd; in hfs_ext_write_extent() local 137 res = hfs_find_init(HFS_SB(inode->i_sb)->ext_tree, &fd); in hfs_ext_write_extent() 140 res = __hfs_ext_write_extent(inode, &fd); in hfs_ext_write_extent() 141 hfs_find_exit(&fd); in hfs_ext_write_extent() 146 static inline int __hfs_ext_read_extent(struct hfs_find_data *fd, struct hfs_extent *extent, in __hfs_ext_read_extent() argument [all …]
|
D | inode.c | 418 struct hfs_find_data fd; in hfs_write_inode() local 449 if (hfs_find_init(HFS_SB(main_inode->i_sb)->cat_tree, &fd)) in hfs_write_inode() 453 fd.search_key->cat = HFS_I(main_inode)->cat_key; in hfs_write_inode() 454 if (hfs_brec_find(&fd)) in hfs_write_inode() 459 if (fd.entrylength < sizeof(struct hfs_cat_dir)) in hfs_write_inode() 461 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode() 470 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode() 473 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode() 477 hfs_bnode_write(fd.bnode, &rec, fd.entryoffset, in hfs_write_inode() 480 if (fd.entrylength < sizeof(struct hfs_cat_file)) in hfs_write_inode() [all …]
|
/linux-4.4.14/include/linux/ |
D | file.h | 29 struct fd { struct 36 static inline void fdput(struct fd fd) in fdput() argument 38 if (fd.flags & FDPUT_FPUT) in fdput() 39 fput(fd.file); in fdput() 42 extern struct file *fget(unsigned int fd); 43 extern struct file *fget_raw(unsigned int fd); 44 extern unsigned long __fdget(unsigned int fd); 45 extern unsigned long __fdget_raw(unsigned int fd); 46 extern unsigned long __fdget_pos(unsigned int fd); 48 static inline struct fd __to_fd(unsigned long v) in __to_fd() [all …]
|
D | fdtable.h | 26 struct file __rcu **fd; /* current fd array */ member 33 static inline bool close_on_exec(int fd, const struct fdtable *fdt) in close_on_exec() argument 35 return test_bit(fd, fdt->close_on_exec); in close_on_exec() 38 static inline bool fd_is_open(int fd, const struct fdtable *fdt) in fd_is_open() argument 40 return test_bit(fd, fdt->open_fds); in fd_is_open() 80 static inline struct file *__fcheck_files(struct files_struct *files, unsigned int fd) in __fcheck_files() argument 84 if (fd < fdt->max_fds) in __fcheck_files() 85 return rcu_dereference_raw(fdt->fd[fd]); in __fcheck_files() 89 static inline struct file *fcheck_files(struct files_struct *files, unsigned int fd) in fcheck_files() argument 94 return __fcheck_files(files, fd); in fcheck_files() [all …]
|
D | syscalls.h | 384 asmlinkage long sys_fsync(unsigned int fd); 385 asmlinkage long sys_fdatasync(unsigned int fd); 393 asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length); 400 asmlinkage long sys_fstatfs(unsigned int fd, struct statfs __user *buf); 401 asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz, 405 asmlinkage long sys_fstat(unsigned int fd, 411 asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf); 416 asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf); 424 asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length); 431 asmlinkage long sys_fsetxattr(int fd, const char __user *name, [all …]
|
/linux-4.4.14/drivers/clk/ti/ |
D | fapll.c | 77 struct fapll_data *fd; member 85 static bool ti_fapll_clock_is_bypass(struct fapll_data *fd) in ti_fapll_clock_is_bypass() argument 87 u32 v = readl_relaxed(fd->base); in ti_fapll_clock_is_bypass() 89 if (fd->bypass_bit_inverted) in ti_fapll_clock_is_bypass() 95 static void ti_fapll_set_bypass(struct fapll_data *fd) in ti_fapll_set_bypass() argument 97 u32 v = readl_relaxed(fd->base); in ti_fapll_set_bypass() 99 if (fd->bypass_bit_inverted) in ti_fapll_set_bypass() 103 writel_relaxed(v, fd->base); in ti_fapll_set_bypass() 106 static void ti_fapll_clear_bypass(struct fapll_data *fd) in ti_fapll_clear_bypass() argument 108 u32 v = readl_relaxed(fd->base); in ti_fapll_clear_bypass() [all …]
|
/linux-4.4.14/fs/jffs2/ |
D | build.c | 55 struct jffs2_full_dirent *fd; in jffs2_build_inode_pass1() local 60 for(fd = ic->scan_dents; fd; fd = fd->next) { in jffs2_build_inode_pass1() 62 if (!fd->ino) in jffs2_build_inode_pass1() 67 child_ic = jffs2_get_ino_cache(c, fd->ino); in jffs2_build_inode_pass1() 70 fd->name, fd->ino, ic->ino); in jffs2_build_inode_pass1() 71 jffs2_mark_node_obsolete(c, fd->raw); in jffs2_build_inode_pass1() 73 fd->ic = NULL; in jffs2_build_inode_pass1() 78 fd->ic = child_ic; in jffs2_build_inode_pass1() 82 if (fd->type == DT_DIR) { in jffs2_build_inode_pass1() 88 dbg_fsbuild("increased nlink for child \"%s\" (ino #%u)\n", fd->name, fd->ino); in jffs2_build_inode_pass1() [all …]
|
D | write.c | 209 struct jffs2_full_dirent *fd; in jffs2_write_dirent() local 242 fd = jffs2_alloc_full_dirent(namelen+1); in jffs2_write_dirent() 243 if (!fd) in jffs2_write_dirent() 246 fd->version = je32_to_cpu(rd->version); in jffs2_write_dirent() 247 fd->ino = je32_to_cpu(rd->ino); in jffs2_write_dirent() 248 fd->nhash = full_name_hash(name, namelen); in jffs2_write_dirent() 249 fd->type = rd->type; in jffs2_write_dirent() 250 memcpy(fd->name, name, namelen); in jffs2_write_dirent() 251 fd->name[namelen]=0; in jffs2_write_dirent() 264 fd->version = je32_to_cpu(rd->version); in jffs2_write_dirent() [all …]
|
D | dir.c | 81 struct jffs2_full_dirent *fd = NULL, *fd_list; in jffs2_lookup() local 97 (!fd || fd_list->version > fd->version) && in jffs2_lookup() 100 fd = fd_list; in jffs2_lookup() 103 if (fd) in jffs2_lookup() 104 ino = fd->ino; in jffs2_lookup() 122 struct jffs2_full_dirent *fd; in jffs2_readdir() local 131 for (fd = f->dents; fd; fd = fd->next) { in jffs2_readdir() 136 fd->name, fd->ino, fd->type, curofs, (unsigned long)ctx->pos); in jffs2_readdir() 139 if (!fd->ino) { in jffs2_readdir() 141 fd->name); in jffs2_readdir() [all …]
|
/linux-4.4.14/fs/ |
D | file.c | 49 kvfree(fdt->fd); in __free_fdtable() 97 memcpy(nfdt->fd, ofdt->fd, cpy); in copy_fdtable() 98 memset((char *)nfdt->fd + cpy, 0, set); in copy_fdtable() 136 fdt->fd = data; in alloc_fdtable() 151 kvfree(fdt->fd); in alloc_fdtable() 245 static inline void __set_close_on_exec(int fd, struct fdtable *fdt) in __set_close_on_exec() argument 247 __set_bit(fd, fdt->close_on_exec); in __set_close_on_exec() 250 static inline void __clear_close_on_exec(int fd, struct fdtable *fdt) in __clear_close_on_exec() argument 252 if (test_bit(fd, fdt->close_on_exec)) in __clear_close_on_exec() 253 __clear_bit(fd, fdt->close_on_exec); in __clear_close_on_exec() [all …]
|
D | sync.c | 154 SYSCALL_DEFINE1(syncfs, int, fd) in SYSCALL_DEFINE1() argument 156 struct fd f = fdget(fd); in SYSCALL_DEFINE1() 213 static int do_fsync(unsigned int fd, int datasync) in do_fsync() argument 215 struct fd f = fdget(fd); in do_fsync() 225 SYSCALL_DEFINE1(fsync, unsigned int, fd) in SYSCALL_DEFINE1() argument 227 return do_fsync(fd, 0); in SYSCALL_DEFINE1() 230 SYSCALL_DEFINE1(fdatasync, unsigned int, fd) in SYSCALL_DEFINE1() argument 232 return do_fsync(fd, 1); in SYSCALL_DEFINE1() 282 SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes, in SYSCALL_DEFINE4() argument 286 struct fd f; in SYSCALL_DEFINE4() [all …]
|
D | read_write.c | 264 static inline struct fd fdget_pos(int fd) in fdget_pos() argument 266 return __to_fd(__fdget_pos(fd)); in fdget_pos() 269 static inline void fdput_pos(struct fd f) in fdput_pos() 276 SYSCALL_DEFINE3(lseek, unsigned int, fd, off_t, offset, unsigned int, whence) in SYSCALL_DEFINE3() argument 279 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() 295 COMPAT_SYSCALL_DEFINE3(lseek, unsigned int, fd, compat_off_t, offset, unsigned int, whence) in COMPAT_SYSCALL_DEFINE3() argument 297 return sys_lseek(fd, offset, whence); in COMPAT_SYSCALL_DEFINE3() 302 SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high, in SYSCALL_DEFINE5() argument 307 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE5() 562 SYSCALL_DEFINE3(read, unsigned int, fd, char __user *, buf, size_t, count) in SYSCALL_DEFINE3() argument [all …]
|
D | fcntl.c | 32 static int setfl(int fd, struct file * filp, unsigned long arg) in setfl() argument 69 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0); in setfl() 243 static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, in do_fcntl() argument 256 err = get_close_on_exec(fd) ? FD_CLOEXEC : 0; in do_fcntl() 260 set_close_on_exec(fd, arg & FD_CLOEXEC); in do_fcntl() 266 err = setfl(fd, filp, arg); in do_fcntl() 283 err = fcntl_setlk(fd, filp, cmd, (struct flock __user *) arg); in do_fcntl() 324 err = fcntl_setlease(fd, filp, arg); in do_fcntl() 327 err = fcntl_dirnotify(fd, filp, arg); in do_fcntl() 356 SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) in SYSCALL_DEFINE3() argument [all …]
|
D | fhandle.c | 114 static struct vfsmount *get_vfsmount_from_fd(int fd) in get_vfsmount_from_fd() argument 118 if (fd == AT_FDCWD) { in get_vfsmount_from_fd() 124 struct fd f = fdget(fd); in get_vfsmount_from_fd() 220 int fd; in do_handle_open() local 226 fd = get_unused_fd_flags(open_flag); in do_handle_open() 227 if (fd < 0) { in do_handle_open() 229 return fd; in do_handle_open() 233 put_unused_fd(fd); in do_handle_open() 236 retval = fd; in do_handle_open() 238 fd_install(fd, file); in do_handle_open()
|
D | compat_ioctl.c | 118 static int w_long(unsigned int fd, unsigned int cmd, in w_long() argument 126 err = sys_ioctl(fd, cmd, (unsigned long)&val); in w_long() 142 static int do_video_get_event(unsigned int fd, unsigned int cmd, in do_video_get_event() argument 150 err = sys_ioctl(fd, cmd, (unsigned long) &kevent); in do_video_get_event() 172 static int do_video_stillpicture(unsigned int fd, unsigned int cmd, in do_video_stillpicture() argument 193 err = sys_ioctl(fd, cmd, (unsigned long) up_native); in do_video_stillpicture() 203 static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd, in do_video_set_spu_palette() argument 221 err = sys_ioctl(fd, cmd, (unsigned long) up_native); in do_video_set_spu_palette() 279 static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, in sg_ioctl_trans() argument 292 return sys_ioctl(fd, cmd, (unsigned long)sgio32); in sg_ioctl_trans() [all …]
|
D | open.c | 154 static long do_sys_ftruncate(unsigned int fd, loff_t length, int small) in do_sys_ftruncate() argument 158 struct fd f; in do_sys_ftruncate() 165 f = fdget(fd); in do_sys_ftruncate() 201 SYSCALL_DEFINE2(ftruncate, unsigned int, fd, unsigned long, length) in SYSCALL_DEFINE2() argument 203 return do_sys_ftruncate(fd, length, 1); in SYSCALL_DEFINE2() 207 COMPAT_SYSCALL_DEFINE2(ftruncate, unsigned int, fd, compat_ulong_t, length) in COMPAT_SYSCALL_DEFINE2() argument 209 return do_sys_ftruncate(fd, length, 1); in COMPAT_SYSCALL_DEFINE2() 220 SYSCALL_DEFINE2(ftruncate64, unsigned int, fd, loff_t, length) in SYSCALL_DEFINE2() argument 222 return do_sys_ftruncate(fd, length, 0); in SYSCALL_DEFINE2() 320 SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len) in SYSCALL_DEFINE4() argument [all …]
|
/linux-4.4.14/arch/um/os-Linux/ |
D | file.c | 37 int os_stat_fd(const int fd, struct uml_stat *ubuf) in os_stat_fd() argument 42 CATCH_EINTR(err = fstat64(fd, &sbuf)); in os_stat_fd() 82 int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg) in os_ioctl_generic() argument 86 err = ioctl(fd, cmd, arg); in os_ioctl_generic() 94 int os_get_ifname(int fd, char* namebuf) in os_get_ifname() argument 96 if (ioctl(fd, SIOCGIFNAME, namebuf) < 0) in os_get_ifname() 102 int os_set_slip(int fd) in os_set_slip() argument 107 if (ioctl(fd, TIOCSETD, &disc) < 0) in os_set_slip() 111 if (ioctl(fd, SIOCSIFENCAP, &sencap) < 0) in os_set_slip() 117 int os_mode_fd(int fd, int mode) in os_mode_fd() argument [all …]
|
D | mem.c | 98 int fd; in make_tempfile() local 115 fd = mkstemp(tempname); in make_tempfile() 116 if (fd < 0) { in make_tempfile() 126 return fd; in make_tempfile() 128 close(fd); in make_tempfile() 138 int fd, err; in create_tmp_file() local 141 fd = make_tempfile(TEMPNAME_TEMPLATE); in create_tmp_file() 142 if (fd < 0) in create_tmp_file() 145 err = fchmod(fd, 0777); in create_tmp_file() 155 if (lseek64(fd, len - 1, SEEK_SET) < 0) { in create_tmp_file() [all …]
|
D | irq.c | 45 pollfds[i].fd = -1; in os_waiting_for_events() 52 int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) in os_create_pollfd() argument 71 pollfds[pollfds_num] = ((struct pollfd) { .fd = fd, in os_create_pollfd() 89 if ((pollfds[i].fd != -1) && in os_free_irq_by_cb() 90 (pollfds[i].fd != (*prev)->fd)) { in os_free_irq_by_cb() 94 (*prev)->fd, pollfds[i].fd); in os_free_irq_by_cb() 111 ignore_sigio_fd(old_fd->fd); in os_free_irq_by_cb() 124 return pollfds[i].fd; in os_get_pollfd() 127 void os_set_pollfd(int i, int fd) in os_set_pollfd() argument 129 pollfds[i].fd = fd; in os_set_pollfd()
|
D | tty.c | 14 int fd; member 23 info->res = grantpt(info->fd); in grantpt_cb() 30 int fd, err; in get_pty() local 32 fd = open("/dev/ptmx", O_RDWR); in get_pty() 33 if (fd < 0) { in get_pty() 40 info.fd = fd; in get_pty() 50 if (unlockpt(fd) < 0) { in get_pty() 56 return fd; in get_pty() 58 close(fd); in get_pty()
|
D | process.c | 31 int fd, err; in os_process_pc() local 34 fd = open(proc_stat, O_RDONLY, 0); in os_process_pc() 35 if (fd < 0) { in os_process_pc() 40 CATCH_EINTR(err = read(fd, buf, sizeof(buf))); in os_process_pc() 46 os_close_file(fd); in os_process_pc() 54 close(fd); in os_process_pc() 63 int parent = FAILURE_PID, n, fd; in os_process_parent() local 69 fd = open(stat, O_RDONLY, 0); in os_process_parent() 70 if (fd < 0) { in os_process_parent() 76 CATCH_EINTR(n = read(fd, data, sizeof(data))); in os_process_parent() [all …]
|
D | umid.c | 137 int dead, fd, p, n, err; in is_umdir_used() local 147 fd = open(file, O_RDONLY); in is_umdir_used() 148 if (fd < 0) { in is_umdir_used() 149 fd = -errno; in is_umdir_used() 150 if (fd != -ENOENT) { in is_umdir_used() 152 "file '%s', err = %d\n", file, -fd); in is_umdir_used() 158 n = read(fd, pid, sizeof(pid)); in is_umdir_used() 183 close(fd); in is_umdir_used() 212 int fd, n; in create_pid_file() local 217 fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0644); in create_pid_file() [all …]
|
D | sigio.c | 72 if (p->fd == sigio_private[1]) { in write_sigio_thread() 167 int add_sigio_fd(int fd) in add_sigio_fd() argument 174 if (all_sigio_fds.poll[i].fd == fd) in add_sigio_fd() 183 if (current_poll.poll[i].fd == fd) in add_sigio_fd() 202 int ignore_sigio_fd(int fd) in ignore_sigio_fd() argument 217 if (current_poll.poll[i].fd == fd) in ignore_sigio_fd() 229 if (p->fd != fd) in ignore_sigio_fd() 240 static struct pollfd *setup_initial_poll(int fd) in setup_initial_poll() argument 250 *p = ((struct pollfd) { .fd = fd, in setup_initial_poll() 339 void sigio_broken(int fd, int read) in sigio_broken() argument [all …]
|
/linux-4.4.14/tools/testing/selftests/efivarfs/ |
D | open-unlink.c | 15 int fd; in set_immutable() local 19 fd = open(path, O_RDONLY); in set_immutable() 20 if (fd < 0) in set_immutable() 21 return fd; in set_immutable() 23 rc = ioctl(fd, FS_IOC_GETFLAGS, &flags); in set_immutable() 26 close(fd); in set_immutable() 36 rc = ioctl(fd, FS_IOC_SETFLAGS, &flags); in set_immutable() 38 close(fd); in set_immutable() 46 int fd; in get_immutable() local 50 fd = open(path, O_RDONLY); in get_immutable() [all …]
|
D | create-read.c | 15 int fd, rc; in main() local 25 fd = open(path, O_RDWR | O_CREAT, 0600); in main() 26 if (fd < 0) { in main() 31 rc = read(fd, buf, sizeof(buf)); in main()
|
/linux-4.4.14/Documentation/timers/ |
D | hpet_example.c | 81 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-4.4.14/arch/um/drivers/ |
D | port_kern.c | 24 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 …]
|
D | chan_user.c | 17 void generic_close(int fd, void *unused) in generic_close() argument 19 close(fd); in generic_close() 22 int generic_read(int fd, char *c_out, void *unused) in generic_read() argument 26 n = read(fd, c_out, sizeof(*c_out)); in generic_read() 38 int generic_write(int fd, const char *buf, int n, void *unused) in generic_write() argument 42 err = write(fd, buf, n); in generic_write() 52 int generic_window_size(int fd, void *unused, unsigned short *rows_out, in generic_window_size() argument 58 if (ioctl(fd, TIOCGWINSZ, &size) < 0) in generic_window_size() 74 int generic_console_write(int fd, const char *buf, int n) in generic_console_write() argument 80 if (isatty(fd)) { in generic_console_write() [all …]
|
D | port_user.c | 74 int fd, err; in port_open() local 76 fd = port_wait(data->kernel_data); in port_open() 77 if ((fd >= 0) && data->raw) { in port_open() 78 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); in port_open() 82 err = raw(fd); in port_open() 87 return fd; in port_open() 90 static void port_close(int fd, void *d) in port_close() argument 95 os_close_file(fd); in port_close() 114 int fd, err, arg; in port_listen_fd() local 116 fd = socket(PF_INET, SOCK_STREAM, 0); in port_listen_fd() [all …]
|
D | pty.c | 45 int fd, err; in pts_open() local 47 fd = get_pty(); in pts_open() 48 if (fd < 0) { in pts_open() 55 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); in pts_open() 59 err = raw(fd); in pts_open() 64 dev = ptsname(fd); in pts_open() 71 return fd; in pts_open() 74 close(fd); in pts_open() 117 int fd, err; in pty_open() local 120 fd = getmaster(dev); in pty_open() [all …]
|
D | umcast_user.c | 70 int fd, yes = 1, err = -EINVAL; in umcast_open() local 78 fd = socket(AF_INET, SOCK_DGRAM, 0); in umcast_open() 80 if (fd < 0) { in umcast_open() 87 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) { in umcast_open() 96 if (setsockopt(fd, SOL_IP, IP_MULTICAST_TTL, &pri->ttl, in umcast_open() 105 if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, in umcast_open() 115 if (bind(fd, (struct sockaddr *) lsin, sizeof(*lsin)) < 0) { in umcast_open() 126 if (setsockopt(fd, SOL_IP, IP_ADD_MEMBERSHIP, in umcast_open() 140 return fd; in umcast_open() 143 close(fd); in umcast_open() [all …]
|
D | xterm.c | 88 int pid, fd, new, err; in xterm_open() local 112 fd = mkstemp(file); in xterm_open() 113 if (fd < 0) { in xterm_open() 124 close(fd); in xterm_open() 127 close(fd); in xterm_open() 129 fd = os_create_unix_socket(file, sizeof(file), 1); in xterm_open() 130 if (fd < 0) { in xterm_open() 132 "errno = %d\n", -fd); in xterm_open() 133 return fd; in xterm_open() 145 err = os_set_fd_block(fd, 0); in xterm_open() [all …]
|
D | fd.c | 16 int fd; member 45 *data = ((struct fd_chan) { .fd = n, in fd_init() 55 if (data->raw && isatty(data->fd)) { in fd_open() 56 CATCH_EINTR(err = tcgetattr(data->fd, &data->tt)); in fd_open() 60 err = raw(data->fd); in fd_open() 64 sprintf(data->str, "%d", data->fd); in fd_open() 66 return data->fd; in fd_open() 69 static void fd_close(int fd, void *d) in fd_close() argument 74 if (!data->raw || !isatty(fd)) in fd_close() 77 CATCH_EINTR(err = tcsetattr(fd, TCSAFLUSH, &data->tt)); in fd_close()
|
D | daemon_user.c | 53 int fd, n, err; in connect_to_switch() local 71 fd = socket(AF_UNIX, SOCK_DGRAM, 0); in connect_to_switch() 72 if (fd < 0) { in connect_to_switch() 78 if (bind(fd, (struct sockaddr *) local_addr, sizeof(*local_addr)) < 0) { in connect_to_switch() 114 return fd; in connect_to_switch() 119 close(fd); in connect_to_switch() 144 pri->fd = connect_to_switch(pri); in daemon_user_init() 145 if (pri->fd < 0) { in daemon_user_init() 148 return pri->fd; in daemon_user_init() 157 return pri->fd; in daemon_open() [all …]
|
D | chan_user.h | 33 extern void generic_close(int fd, void *unused); 34 extern int generic_read(int fd, char *c_out, void *unused); 35 extern int generic_write(int fd, const char *buf, int n, void *unused); 36 extern int generic_console_write(int fd, const char *buf, int n); 37 extern int generic_window_size(int fd, void *unused, unsigned short *rows_out, 42 extern void register_winch(int fd, struct tty_port *port); 43 extern void register_winch_irq(int fd, int tty_fd, int pid,
|
D | chan_kern.c | 30 static void not_configged_close(int fd, void *data) in not_configged_close() argument 36 static int not_configged_read(int fd, char *c_out, void *data) in not_configged_read() argument 43 static int not_configged_write(int fd, const char *buf, int len, void *data) in not_configged_write() argument 50 static int not_configged_console_write(int fd, const char *buf, int len) in not_configged_console_write() argument 57 static int not_configged_window_size(int fd, void *data, unsigned short *rows, in not_configged_window_size() argument 86 int fd, err; in open_one_chan() local 92 fd = 0; in open_one_chan() 93 else fd = (*chan->ops->open)(chan->input, chan->output, chan->primary, in open_one_chan() 95 if (fd < 0) in open_one_chan() 96 return fd; in open_one_chan() [all …]
|
D | slirp_user.c | 37 static int slirp_tramp(char **argv, int fd) in slirp_tramp() argument 42 pe_data.stdin_fd = fd; in slirp_tramp() 43 pe_data.stdout_fd = fd; in slirp_tramp() 77 static void slirp_close(int fd, void *data) in slirp_close() argument 82 close(fd); in slirp_close() 106 int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri) in slirp_user_read() argument 108 return slip_proto_read(fd, buf, len, &pri->slip); in slirp_user_read() 111 int slirp_user_write(int fd, void *buf, int len, struct slirp_data *pri) in slirp_user_write() argument 113 return slip_proto_write(fd, buf, len, &pri->slip); in slirp_user_write()
|
D | ubd_kern.c | 123 int fd; member 138 int fd; member 156 .fd = -1, \ 165 .fd = -1, \ 500 int fd; in ubd_file_size() local 517 fd = os_open_file(ubd_dev->file, of_read(OPENFLAGS()), 0); in ubd_file_size() 518 if (fd < 0) in ubd_file_size() 519 return fd; in ubd_file_size() 521 err = read_cow_header(file_reader, &fd, &version, &backing_file, \ in ubd_file_size() 523 os_close_file(fd); in ubd_file_size() [all …]
|
D | xterm_kern.c | 15 int fd; member 23 int fd; in xterm_interrupt() local 25 fd = os_rcv_fd(xterm->fd, &xterm->pid); in xterm_interrupt() 26 if (fd == -EAGAIN) in xterm_interrupt() 29 xterm->new_fd = fd; in xterm_interrupt() 47 *data = ((struct xterm_wait) { .fd = socket, in xterm_fd()
|
D | net_user.c | 50 void read_output(int fd, char *output, int len) in read_output() argument 62 ret = read(fd, &remain, sizeof(remain)); in read_output() 74 ret = read(fd, output, expected); in read_output() 95 int net_read(int fd, void *buf, int len) in net_read() argument 99 n = read(fd, buf, len); in net_read() 108 int net_recvfrom(int fd, void *buf, int len) in net_recvfrom() argument 112 CATCH_EINTR(n = recvfrom(fd, buf, len, 0, NULL, NULL)); in net_recvfrom() 123 int net_write(int fd, void *buf, int len) in net_write() argument 127 n = write(fd, buf, len); in net_write() 136 int net_send(int fd, void *buf, int len) in net_send() argument [all …]
|
D | tty.c | 43 int fd, err, mode = 0; in tty_open() local 52 fd = open(data->dev, mode); in tty_open() 53 if (fd < 0) in tty_open() 57 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); in tty_open() 61 err = raw(fd); in tty_open() 67 return fd; in tty_open()
|
D | slip_user.c | 27 static int set_up_tty(int fd) in set_up_tty() argument 32 if (tcgetattr(fd, &tios) < 0) { in set_up_tty() 50 if (tcsetattr(fd, TCSAFLUSH, &tios) < 0) { in set_up_tty() 74 static int slip_tramp(char **argv, int fd) in slip_tramp() argument 88 pe_data.stdin_fd = fd; in slip_tramp() 190 static void slip_close(int fd, void *data) in slip_close() argument 207 close(fd); in slip_close() 212 int slip_user_read(int fd, void *buf, int len, struct slip_data *pri) in slip_user_read() argument 214 return slip_proto_read(fd, buf, len, &pri->slip); in slip_user_read() 217 int slip_user_write(int fd, void *buf, int len, struct slip_data *pri) in slip_user_write() argument [all …]
|
D | null.c | 23 int fd; in null_open() local 27 fd = open(DEV_NULL, O_RDWR); in null_open() 28 return (fd < 0) ? -errno : fd; in null_open() 31 static int null_read(int fd, char *c_out, void *unused) in null_read() argument
|
D | cow_sys.h | 25 static inline int cow_seek_file(int fd, __u64 offset) in cow_seek_file() argument 27 return os_seek_file(fd, offset); in cow_seek_file() 35 static inline int cow_write_file(int fd, void *buf, int size) in cow_write_file() argument 37 return os_write_file(fd, buf, size); in cow_write_file()
|
D | line.c | 274 int line_setup_irq(int fd, int input, int output, struct line *line, void *data) in line_setup_irq() argument 280 err = um_request_irq(driver->read_irq, fd, IRQ_READ, in line_setup_irq() 286 err = um_request_irq(driver->write_irq, fd, IRQ_WRITE, in line_setup_irq() 597 int fd; member 619 int fd = winch->fd; in free_winch() local 620 winch->fd = -1; in free_winch() 621 if (fd != -1) in free_winch() 622 os_close_file(fd); in free_winch() 632 int fd = winch->fd; in winch_interrupt() local 637 if (fd != -1) { in winch_interrupt() [all …]
|
D | daemon_kern.c | 29 dpri->fd = -1; in daemon_init() 42 static int daemon_read(int fd, struct sk_buff *skb, struct uml_net_private *lp) in daemon_read() argument 44 return net_recvfrom(fd, skb_mac_header(skb), in daemon_read() 48 static int daemon_write(int fd, struct sk_buff *skb, struct uml_net_private *lp) in daemon_write() argument 50 return daemon_user_write(fd, skb->data, skb->len, in daemon_write()
|
/linux-4.4.14/tools/perf/tests/ |
D | fdarray.c | 7 int fd; in fdarray__init_revents() local 11 for (fd = 0; fd < fda->nr; ++fd) { in fdarray__init_revents() 12 fda->entries[fd].fd = fda->nr - fd; in fdarray__init_revents() 13 fda->entries[fd].revents = revents; in fdarray__init_revents() 30 int nr_fds, expected_fd[2], fd, err = TEST_FAIL; in test__fdarray__filter() local 56 expected_fd[0] = fda->entries[2].fd; in test__fdarray__filter() 67 if (fda->entries[0].fd != expected_fd[0]) { in test__fdarray__filter() 69 fda->entries[0].fd, expected_fd[0]); in test__fdarray__filter() 75 expected_fd[0] = fda->entries[0].fd; in test__fdarray__filter() 77 expected_fd[1] = fda->entries[3].fd; in test__fdarray__filter() [all …]
|
D | dso-data.c | 20 int fd, i; in test_file() local 26 fd = mkstemp(templ); in test_file() 27 if (fd < 0) { in test_file() 34 close(fd); in test_file() 41 if (size != write(fd, buf, size)) in test_file() 45 close(fd); in test_file() 105 int fd = dso__data_get_fd(dso, machine); in dso__data_fd() local 107 if (fd >= 0) in dso__data_fd() 110 return fd; in dso__data_fd() 252 int dso_cnt, limit, i, fd; in test__dso_data_cache() local [all …]
|
D | bp_signal_overflow.c | 44 static long long bp_count(int fd) in bp_count() argument 49 ret = read(fd, &count, sizeof(long long)); in bp_count() 66 int fd, i, fails = 0; in test__bp_signal_overflow() local 95 fd = sys_perf_event_open(&pe, 0, -1, -1, in test__bp_signal_overflow() 97 if (fd < 0) { in test__bp_signal_overflow() 102 fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC); in test__bp_signal_overflow() 103 fcntl(fd, F_SETSIG, SIGIO); in test__bp_signal_overflow() 104 fcntl(fd, F_SETOWN, getpid()); in test__bp_signal_overflow() 106 ioctl(fd, PERF_EVENT_IOC_RESET, 0); in test__bp_signal_overflow() 107 ioctl(fd, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal_overflow() [all …]
|
D | bp_signal.c | 63 int fd; in bp_event() local 82 fd = sys_perf_event_open(&pe, 0, -1, -1, in bp_event() 84 if (fd < 0) { in bp_event() 90 fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC); in bp_event() 91 fcntl(fd, F_SETSIG, SIGIO); in bp_event() 92 fcntl(fd, F_SETOWN, getpid()); in bp_event() 95 ioctl(fd, PERF_EVENT_IOC_RESET, 0); in bp_event() 97 return fd; in bp_event() 100 static long long bp_count(int fd) in bp_count() argument 105 ret = read(fd, &count, sizeof(long long)); in bp_count()
|
D | attr.c | 61 int fd, int group_fd, unsigned long flags) in store_event() argument 67 attr->type, attr->config, fd); in store_event() 76 attr->type, attr->config, fd) < 0) { in store_event() 83 __WRITE_ASS(fd, "d", fd); in store_event() 131 int fd, int group_fd, unsigned long flags) in test_attr__open() argument 135 if (store_event(attr, pid, cpu, fd, group_fd, flags)) in test_attr__open()
|
/linux-4.4.14/tools/perf/tests/attr/ |
D | test-stat-detailed-3 | 9 fd=1 15 fd=2 21 fd=3 27 fd=4 33 fd=5 39 fd=6 45 fd=7 51 fd=8 57 fd=9 63 fd=10 [all …]
|
D | test-stat-detailed-2 | 9 fd=1 15 fd=2 21 fd=3 27 fd=4 33 fd=5 39 fd=6 45 fd=7 51 fd=8 57 fd=9 63 fd=10 [all …]
|
D | test-stat-detailed-1 | 9 fd=1 15 fd=2 21 fd=3 27 fd=4 33 fd=5 39 fd=6 45 fd=7 51 fd=8 57 fd=9 63 fd=10 [all …]
|
D | test-stat-default | 8 fd=1 14 fd=2 20 fd=3 26 fd=4 32 fd=5 38 fd=6 44 fd=7 50 fd=8 56 fd=9 62 fd=10
|
/linux-4.4.14/tools/perf/util/ |
D | data.c | 16 int fd = perf_data_file__is_read(file) ? in check_pipe() local 20 if (!fstat(fd, &st) && S_ISFIFO(st.st_mode)) in check_pipe() 28 file->fd = fd; in check_pipe() 52 int fd; in open_file_read() local 55 fd = open(file->path, O_RDONLY); in open_file_read() 56 if (fd < 0) { in open_file_read() 67 if (fstat(fd, &st) < 0) in open_file_read() 83 return fd; in open_file_read() 86 close(fd); in open_file_read() 92 int fd; in open_file_write() local [all …]
|
D | header.c | 62 static int do_write(int fd, const void *buf, size_t size) in do_write() argument 65 int ret = write(fd, buf, size); in do_write() 77 int write_padded(int fd, const void *bf, size_t count, size_t count_aligned) in write_padded() argument 80 int err = do_write(fd, bf, count); in write_padded() 83 err = do_write(fd, zero_buf, count_aligned - count); in write_padded() 91 static int do_write_string(int fd, const char *str) in do_write_string() argument 100 ret = do_write(fd, &len, sizeof(len)); in do_write_string() 104 return write_padded(fd, str, olen, len); in do_write_string() 107 static char *do_read_string(int fd, struct perf_header *ph) in do_read_string() argument 113 sz = readn(fd, &len, sizeof(len)); in do_read_string() [all …]
|
D | probe-file.c | 105 int fd; in probe_file__open() local 108 fd = open_uprobe_events(flag & PF_FL_RW); in probe_file__open() 110 fd = open_kprobe_events(flag & PF_FL_RW); in probe_file__open() 111 if (fd < 0) in probe_file__open() 112 print_open_warning(fd, flag & PF_FL_UPROBE); in probe_file__open() 114 return fd; in probe_file__open() 133 struct strlist *probe_file__get_rawlist(int fd) in probe_file__get_rawlist() argument 141 if (fd < 0) in probe_file__get_rawlist() 146 fp = fdopen(dup(fd), "r"); in probe_file__get_rawlist() 167 static struct strlist *__probe_file__get_namelist(int fd, bool include_group) in __probe_file__get_namelist() argument [all …]
|
D | cloexec.c | 28 int fd; in perf_flag_probe() local 44 fd = sys_perf_event_open(&attr, pid, cpu, -1, in perf_flag_probe() 46 if (fd < 0 && pid == -1 && errno == EACCES) { in perf_flag_probe() 54 if (fd >= 0) { in perf_flag_probe() 55 close(fd); in perf_flag_probe() 65 fd = sys_perf_event_open(&attr, pid, cpu, -1, 0); in perf_flag_probe() 66 if (fd < 0 && pid == -1 && errno == EACCES) { in perf_flag_probe() 74 if (fd >= 0) in perf_flag_probe() 75 close(fd); in perf_flag_probe() 77 if (WARN_ONCE(fd < 0 && err != EBUSY, in perf_flag_probe()
|
D | record.c | 16 int err = -EAGAIN, fd; in perf_do_probe_api() local 29 fd = sys_perf_event_open(&evsel->attr, pid, cpu, -1, flags); in perf_do_probe_api() 30 if (fd < 0) { in perf_do_probe_api() 39 close(fd); in perf_do_probe_api() 43 fd = sys_perf_event_open(&evsel->attr, pid, cpu, -1, flags); in perf_do_probe_api() 44 if (fd < 0) { in perf_do_probe_api() 49 close(fd); in perf_do_probe_api() 116 int cpu, fd; in perf_can_record_cpu_wide() local 124 fd = sys_perf_event_open(&attr, -1, cpu, -1, 0); in perf_can_record_cpu_wide() 125 if (fd < 0) in perf_can_record_cpu_wide() [all …]
|
D | symbol-minimal.c | 220 int fd; in sysfs__read_build_id() local 226 fd = open(filename, O_RDONLY); in sysfs__read_build_id() 227 if (fd < 0) in sysfs__read_build_id() 230 if (fstat(fd, &stbuf) < 0) in sysfs__read_build_id() 238 if (read(fd, buf, buf_size) != (ssize_t) buf_size) in sysfs__read_build_id() 245 close(fd); in sysfs__read_build_id() 252 int fd = open(name, O_RDONLY); in symsrc__init() local 253 if (fd < 0) in symsrc__init() 260 ss->fd = fd; in symsrc__init() 265 close(fd); in symsrc__init() [all …]
|
D | probe-file.h | 13 struct strlist *probe_file__get_namelist(int fd); 14 struct strlist *probe_file__get_rawlist(int fd); 15 int probe_file__add_event(int fd, struct probe_trace_event *tev); 16 int probe_file__del_events(int fd, struct strfilter *filter); 17 int probe_file__get_events(int fd, struct strfilter *filter, 19 int probe_file__del_strlist(int fd, struct strlist *namelist);
|
D | vdso.c | 73 int fd; in get_file() local 87 fd = mkstemp(vdso_file->temp_file_name); in get_file() 88 if (fd < 0) in get_file() 91 if (size == (size_t) write(fd, buf, size)) in get_file() 94 close(fd); in get_file() 159 static int vdso__do_copy_compat(FILE *f, int fd) in vdso__do_copy_compat() argument 170 if (count && writen(fd, buf, count) != (ssize_t)count) in vdso__do_copy_compat() 177 static int vdso__copy_compat(const char *prog, int fd) in vdso__copy_compat() argument 186 err = vdso__do_copy_compat(f, fd); in vdso__copy_compat() 196 int fd, err; in vdso__create_compat_file() local [all …]
|
D | symbol-elf.c | 430 int fd, err = -1; in filename__read_build_id() local 436 fd = open(filename, O_RDONLY); in filename__read_build_id() 437 if (fd < 0) in filename__read_build_id() 440 elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); in filename__read_build_id() 450 close(fd); in filename__read_build_id() 457 int fd, err = -1; in sysfs__read_build_id() local 462 fd = open(filename, O_RDONLY); in sysfs__read_build_id() 463 if (fd < 0) in sysfs__read_build_id() 471 if (read(fd, &nhdr, sizeof(nhdr)) != sizeof(nhdr)) in sysfs__read_build_id() 478 if (read(fd, bf, namesz) != (ssize_t)namesz) in sysfs__read_build_id() [all …]
|
D | header.h | 67 struct perf_header *ph, int fd); 85 int fd, bool at_exit); 86 int perf_header__write_pipe(int fd); 94 int perf_header__process_sections(struct perf_header *header, int fd, 98 int feat, int fd, void *data)); 112 int fd, struct perf_evlist *evlist, 129 int write_padded(int fd, const void *bf, size_t count, size_t count_aligned);
|
D | cgroup.c | 61 int fd; in open_cgroup() local 69 fd = open(path, O_RDONLY); in open_cgroup() 70 if (fd == -1) in open_cgroup() 73 return fd; in open_cgroup() 101 cgrp->fd = open_cgroup(str); in add_cgroup() 102 if (cgrp->fd == -1) { in add_cgroup() 131 close(cgrp->fd); in close_cgroup()
|
/linux-4.4.14/samples/bpf/ |
D | fds_example.c | 69 int fd, ret; in bpf_do_map() local 72 fd = bpf_map_create(); in bpf_do_map() 73 printf("bpf: map fd:%d (%s)\n", fd, strerror(errno)); in bpf_do_map() 74 assert(fd > 0); in bpf_do_map() 76 ret = bpf_obj_pin(fd, file); in bpf_do_map() 80 fd = bpf_obj_get(file); in bpf_do_map() 81 printf("bpf: get fd:%d (%s)\n", fd, strerror(errno)); in bpf_do_map() 82 assert(fd > 0); in bpf_do_map() 86 ret = bpf_update_elem(fd, &key, &value, 0); in bpf_do_map() 87 printf("bpf: fd:%d u->(%u:%u) ret:(%d,%s)\n", fd, key, value, in bpf_do_map() [all …]
|
D | libbpf.c | 34 int bpf_update_elem(int fd, void *key, void *value, unsigned long long flags) in bpf_update_elem() argument 37 .map_fd = fd, in bpf_update_elem() 46 int bpf_lookup_elem(int fd, void *key, void *value) in bpf_lookup_elem() argument 49 .map_fd = fd, in bpf_lookup_elem() 57 int bpf_delete_elem(int fd, void *key) in bpf_delete_elem() argument 60 .map_fd = fd, in bpf_delete_elem() 67 int bpf_get_next_key(int fd, void *key, void *next_key) in bpf_get_next_key() argument 70 .map_fd = fd, in bpf_get_next_key() 106 int bpf_obj_pin(int fd, const char *pathname) in bpf_obj_pin() argument 110 .bpf_fd = fd, in bpf_obj_pin()
|
D | bpf_load.c | 54 int fd, efd, err, id; in load_and_attach() local 71 fd = bpf_prog_load(prog_type, prog, size, license, kern_version); in load_and_attach() 72 if (fd < 0) { in load_and_attach() 77 prog_fd[prog_cnt++] = fd; in load_and_attach() 88 return populate_prog_array(event, fd); in load_and_attach() 103 return populate_prog_array(event, fd); in load_and_attach() 146 ioctl(efd, PERF_EVENT_IOC_SET_BPF, fd); in load_and_attach() 225 int fd, i; in load_bpf_file() local 235 fd = open(path, O_RDONLY, 0); in load_bpf_file() 236 if (fd < 0) in load_bpf_file() [all …]
|
D | tracex2_user.c | 37 static void print_hist_for_pid(int fd, void *task) in print_hist_for_pid() argument 47 while (bpf_get_next_key(fd, &key, &next_key) == 0) { in print_hist_for_pid() 52 bpf_lookup_elem(fd, &next_key, &value); in print_hist_for_pid() 72 static void print_hist(int fd) in print_hist() argument 79 while (bpf_get_next_key(fd, &key, &next_key) == 0) { in print_hist() 95 print_hist_for_pid(fd, &tasks[i]); in print_hist()
|
D | tracex3_user.c | 21 static void clear_stats(int fd) in clear_stats() argument 27 bpf_update_elem(fd, &key, &value, BPF_ANY); in clear_stats() 76 static void print_hist(int fd) in print_hist() argument 86 bpf_lookup_elem(fd, &key, &value); in print_hist() 92 clear_stats(fd); in print_hist()
|
/linux-4.4.14/samples/uhid/ |
D | uhid-example.c | 158 static int uhid_write(int fd, const struct uhid_event *ev) in uhid_write() argument 162 ret = write(fd, ev, sizeof(*ev)); in uhid_write() 175 static int create(int fd) in create() argument 190 return uhid_write(fd, &ev); in create() 193 static void destroy(int fd) in destroy() argument 200 uhid_write(fd, &ev); in destroy() 224 static int event(int fd) in event() argument 230 ret = read(fd, &ev, sizeof(ev)); in event() 277 static int send_event(int fd) in send_event() argument 297 return uhid_write(fd, &ev); in send_event() [all …]
|
/linux-4.4.14/tools/lib/api/fd/ |
D | array.c | 73 int fdarray__add(struct fdarray *fda, int fd, short revents) in fdarray__add() argument 81 fda->entries[fda->nr].fd = fd; in fdarray__add() 88 void (*entry_destructor)(struct fdarray *fda, int fd)) in fdarray__filter() 90 int fd, nr = 0; in fdarray__filter() local 95 for (fd = 0; fd < fda->nr; ++fd) { in fdarray__filter() 96 if (fda->entries[fd].revents & revents) { in fdarray__filter() 98 entry_destructor(fda, fd); in fdarray__filter() 103 if (fd != nr) { in fdarray__filter() 104 fda->entries[nr] = fda->entries[fd]; in fdarray__filter() 105 fda->priv[nr] = fda->priv[fd]; in fdarray__filter() [all …]
|
/linux-4.4.14/drivers/media/platform/exynos4-is/ |
D | fimc-is-param.c | 142 __hw_param_copy(&par->fd.control, &cfg->fd.control); in __fimc_is_hw_update_param() 146 __hw_param_copy(&par->fd.otf_input, &cfg->fd.otf_input); in __fimc_is_hw_update_param() 150 __hw_param_copy(&par->fd.dma_input, &cfg->fd.dma_input); in __fimc_is_hw_update_param() 154 __hw_param_copy(&par->fd.config, &cfg->fd.config); in __fimc_is_hw_update_param() 224 struct fd_param *fd; in __is_set_frame_size() local 228 fd = &is->config[index].fd; in __is_set_frame_size() 241 fd->otf_input.width = mf->width; in __is_set_frame_size() 242 fd->otf_input.height = mf->height; in __is_set_frame_size() 475 struct fd_param *fd; in __is_set_fd_control() local 479 fd = &is->config[index].fd; in __is_set_fd_control() [all …]
|
/linux-4.4.14/arch/xtensa/kernel/ |
D | smp.c | 469 struct flush_data *fd = arg; in ipi_flush_tlb_page() local 470 local_flush_tlb_page(fd->vma, fd->addr1); in ipi_flush_tlb_page() 475 struct flush_data fd = { in flush_tlb_page() local 479 on_each_cpu(ipi_flush_tlb_page, &fd, 1); in flush_tlb_page() 484 struct flush_data *fd = arg; in ipi_flush_tlb_range() local 485 local_flush_tlb_range(fd->vma, fd->addr1, fd->addr2); in ipi_flush_tlb_range() 491 struct flush_data fd = { in flush_tlb_range() local 496 on_each_cpu(ipi_flush_tlb_range, &fd, 1); in flush_tlb_range() 501 struct flush_data *fd = arg; in ipi_flush_tlb_kernel_range() local 502 local_flush_tlb_kernel_range(fd->addr1, fd->addr2); in ipi_flush_tlb_kernel_range() [all …]
|
/linux-4.4.14/fs/hostfs/ |
D | hostfs_user.c | 41 int stat_file(const char *path, struct hostfs_stat *p, int fd) in stat_file() argument 45 if (fd >= 0) { in stat_file() 46 if (fstat64(fd, &buf) < 0) in stat_file() 72 int mode = 0, fd; in open_file() local 84 fd = open64(path, mode); in open_file() 85 if (fd < 0) in open_file() 87 else return fd; in open_file() 124 int read_file(int fd, unsigned long long *offset, char *buf, int len) in read_file() argument 128 n = pread64(fd, buf, len, *offset); in read_file() 135 int write_file(int fd, unsigned long long *offset, const char *buf, int len) in write_file() argument [all …]
|
D | hostfs.h | 65 extern int stat_file(const char *path, struct hostfs_stat *p, int fd); 74 extern int replace_file(int oldfd, int fd); 76 extern int read_file(int fd, unsigned long long *offset, char *buf, int len); 77 extern int write_file(int fd, unsigned long long *offset, const char *buf, 79 extern int lseek_file(int fd, long long offset, int whence); 80 extern int fsync_file(int fd, int datasync); 82 extern int set_attr(const char *file, struct hostfs_iattr *attrs, int fd);
|
D | hostfs_kern.c | 24 int fd; member 229 hi->fd = -1; in hostfs_alloc_inode() 240 if (HOSTFS_I(inode)->fd != -1) { in hostfs_evict_inode() 241 close_file(&HOSTFS_I(inode)->fd); in hostfs_evict_inode() 242 HOSTFS_I(inode)->fd = -1; in hostfs_evict_inode() 310 int r, w, fd; in hostfs_open() local 330 fd = open_file(name, r, w, append); in hostfs_open() 332 if (fd < 0) in hostfs_open() 333 return fd; in hostfs_open() 339 close_file(&fd); in hostfs_open() [all …]
|
/linux-4.4.14/arch/um/kernel/ |
D | irq.c | 60 static int activate_fd(int irq, int fd, int type, void *dev_id) in activate_fd() argument 67 err = os_set_fd_async(fd); in activate_fd() 81 .fd = fd, in activate_fd() 90 if ((irq_fd->fd == fd) && (irq_fd->type == type)) { in activate_fd() 91 printk(KERN_ERR "Registering fd %d twice\n", fd); in activate_fd() 100 fd = -1; in activate_fd() 106 n = os_create_pollfd(fd, events, tmp_pfd, n); in activate_fd() 141 maybe_sigio_broken(fd, (type == IRQ_READ)); in activate_fd() 182 static int same_fd(struct irq_fd *irq, void *fd) in same_fd() argument 184 return (irq->fd == *((int *)fd)); in same_fd() [all …]
|
D | physmem.c | 45 int fd, err; in map_memory() local 47 fd = phys_mapping(phys, &offset); in map_memory() 48 err = os_map_memory((void *) virt, fd, offset, len, r, w, x); in map_memory() 55 "err = %d\n", virt, fd, offset, len, r, w, x, err); in map_memory() 123 int fd = -1; in phys_mapping() local 126 fd = physmem_fd; in phys_mapping() 135 fd = region->fd; in phys_mapping() 143 fd = physmem_fd; in phys_mapping() 147 return fd; in phys_mapping() 207 err = os_map_memory((void *) iomem_start, region->fd, 0, in setup_iomem()
|
D | initrd.c | 67 int fd, n; in load_initrd() local 69 fd = os_open_file(filename, of_read(OPENFLAGS()), 0); in load_initrd() 70 if (fd < 0) { in load_initrd() 72 -fd); in load_initrd() 75 n = os_read_file(fd, buf, size); in load_initrd() 83 os_close_file(fd); in load_initrd()
|
/linux-4.4.14/tools/power/cpupower/utils/helpers/ |
D | msr.c | 28 int fd; in read_msr() local 32 fd = open(msr_file_name, O_RDONLY); in read_msr() 33 if (fd < 0) in read_msr() 35 if (lseek(fd, idx, SEEK_CUR) == -1) in read_msr() 37 if (read(fd, val, sizeof *val) != sizeof *val) in read_msr() 39 close(fd); in read_msr() 42 close(fd); in read_msr() 57 int fd; in write_msr() local 61 fd = open(msr_file_name, O_WRONLY); in write_msr() 62 if (fd < 0) in write_msr() [all …]
|
D | sysfs.c | 21 int fd; in sysfs_read_file() local 24 fd = open(path, O_RDONLY); in sysfs_read_file() 25 if (fd == -1) in sysfs_read_file() 28 numread = read(fd, buf, buflen - 1); in sysfs_read_file() 30 close(fd); in sysfs_read_file() 35 close(fd); in sysfs_read_file() 51 int fd; in sysfs_is_cpu_online() local 71 fd = open(path, O_RDONLY); in sysfs_is_cpu_online() 72 if (fd == -1) in sysfs_is_cpu_online() 75 numread = read(fd, linebuf, MAX_LINE_LEN - 1); in sysfs_is_cpu_online() [all …]
|
/linux-4.4.14/arch/um/include/shared/ |
D | os.h | 134 extern int os_stat_fd(const int fd, struct uml_stat *buf); 136 extern int os_set_exec_close(int fd); 137 extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg); 138 extern int os_get_ifname(int fd, char *namebuf); 139 extern int os_set_slip(int fd); 140 extern int os_mode_fd(int fd, int mode); 141 extern int os_fsync_file(int fd); 143 extern int os_seek_file(int fd, unsigned long long offset); 145 extern int os_read_file(int fd, void *buf, int len); 146 extern int os_write_file(int fd, const void *buf, int count); [all …]
|
D | net_user.h | 38 extern void read_output(int fd, char *output_out, int len); 40 extern int net_read(int fd, void *buf, int len); 41 extern int net_recvfrom(int fd, void *buf, int len); 42 extern int net_write(int fd, void *buf, int len); 43 extern int net_send(int fd, void *buf, int len); 44 extern int net_sendto(int fd, void *buf, int len, void *to, int sock_len);
|
D | irq_user.h | 14 int fd; member 25 extern void free_irq_by_fd(int fd); 26 extern void reactivate_fd(int fd, int irqnum); 27 extern void deactivate_fd(int fd, int irqnum); 29 extern int activate_ipi(int fd, int pid);
|
/linux-4.4.14/arch/tile/gxio/ |
D | uart.c | 31 int fd; in gxio_uart_init() local 34 fd = hv_dev_open((HV_VirtAddr) file, 0); in gxio_uart_init() 35 if (fd < 0) { in gxio_uart_init() 36 if (fd >= GXIO_ERR_MIN && fd <= GXIO_ERR_MAX) in gxio_uart_init() 37 return fd; in gxio_uart_init() 42 context->fd = fd; in gxio_uart_init() 46 iorpc_ioremap(fd, HV_UART_MMIO_OFFSET, HV_UART_MMIO_SIZE); in gxio_uart_init() 49 hv_dev_close(context->fd); in gxio_uart_init() 50 context->fd = -1; in gxio_uart_init() 62 hv_dev_close(context->fd); in gxio_uart_destroy() [all …]
|
D | usb_host.c | 33 int fd; in gxio_usb_host_init() local 42 fd = hv_dev_open((HV_VirtAddr) file, 0); in gxio_usb_host_init() 43 if (fd < 0) { in gxio_usb_host_init() 44 if (fd >= GXIO_ERR_MIN && fd <= GXIO_ERR_MAX) in gxio_usb_host_init() 45 return fd; in gxio_usb_host_init() 50 context->fd = fd; in gxio_usb_host_init() 54 (void __force *)iorpc_ioremap(fd, 0, HV_USB_HOST_MMIO_SIZE); in gxio_usb_host_init() 57 hv_dev_close(context->fd); in gxio_usb_host_init() 69 hv_dev_close(context->fd); in gxio_usb_host_destroy() 72 context->fd = -1; in gxio_usb_host_destroy()
|
D | trio.c | 31 int fd; in gxio_trio_init() local 34 fd = hv_dev_open((HV_VirtAddr) file, 0); in gxio_trio_init() 35 if (fd < 0) { in gxio_trio_init() 36 context->fd = -1; in gxio_trio_init() 38 if (fd >= GXIO_ERR_MIN && fd <= GXIO_ERR_MAX) in gxio_trio_init() 39 return fd; in gxio_trio_init() 44 context->fd = fd; in gxio_trio_init()
|
D | iorpc_globals.c | 22 int __iorpc_arm_pollfd(int fd, int pollfd_cookie) in __iorpc_arm_pollfd() argument 29 return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params), in __iorpc_arm_pollfd() 39 int __iorpc_close_pollfd(int fd, int pollfd_cookie) in __iorpc_close_pollfd() argument 46 return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params), in __iorpc_close_pollfd() 56 int __iorpc_get_mmio_base(int fd, HV_PTE *base) in __iorpc_get_mmio_base() argument 63 hv_dev_pread(fd, 0, (HV_VirtAddr) params, sizeof(*params), in __iorpc_get_mmio_base() 77 int __iorpc_check_mmio_offset(int fd, unsigned long offset, unsigned long size) in __iorpc_check_mmio_offset() argument 85 return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params), in __iorpc_check_mmio_offset()
|
D | iorpc_mpipe.c | 35 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_alloc_buffer_stacks() 69 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_init_buffer_stack_aux() 94 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_alloc_notif_rings() 124 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_init_notif_ring_aux() 150 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_request_notif_ring_interrupt() 169 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_enable_notif_ring_interrupt() 193 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_alloc_notif_groups() 214 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_init_notif_group() 236 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_alloc_buckets() 256 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_mpipe_init_bucket() [all …]
|
D | iorpc_trio.c | 34 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_trio_alloc_asids() 58 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_trio_alloc_memory_maps() 81 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_trio_alloc_scatter_queues() 105 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_trio_alloc_pio_regions() 130 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_trio_init_pio_region_aux() 167 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_trio_init_memory_map_mmu_aux() 186 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), in gxio_trio_get_port_property() 215 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_trio_config_legacy_intr() 249 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_trio_config_msi_intr() 272 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, in gxio_trio_set_mps_mrs() [all …]
|
D | mpipe.c | 37 int fd; in gxio_mpipe_init() local 44 fd = hv_dev_open((HV_VirtAddr) file, 0); in gxio_mpipe_init() 46 context->fd = fd; in gxio_mpipe_init() 48 if (fd < 0) { in gxio_mpipe_init() 49 if (fd >= GXIO_ERR_MIN && fd <= GXIO_ERR_MAX) in gxio_mpipe_init() 50 return fd; in gxio_mpipe_init() 57 iorpc_ioremap(fd, HV_MPIPE_CONFIG_MMIO_OFFSET, in gxio_mpipe_init() 63 iorpc_ioremap(fd, HV_MPIPE_FAST_MMIO_OFFSET, in gxio_mpipe_init() 79 hv_dev_close(context->fd); in gxio_mpipe_init() 80 context->fd = -1; in gxio_mpipe_init() [all …]
|
/linux-4.4.14/tools/perf/scripts/perl/ |
D | rw-by-file.pl | 31 $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-4.4.14/arch/sh/kernel/ |
D | smp.c | 383 struct flush_tlb_data *fd = (struct flush_tlb_data *)info; in flush_tlb_range_ipi() local 385 local_flush_tlb_range(fd->vma, fd->addr1, fd->addr2); in flush_tlb_range_ipi() 395 struct flush_tlb_data fd; in flush_tlb_range() local 397 fd.vma = vma; in flush_tlb_range() 398 fd.addr1 = start; in flush_tlb_range() 399 fd.addr2 = end; in flush_tlb_range() 400 smp_call_function(flush_tlb_range_ipi, (void *)&fd, 1); in flush_tlb_range() 413 struct flush_tlb_data *fd = (struct flush_tlb_data *)info; in flush_tlb_kernel_range_ipi() local 415 local_flush_tlb_kernel_range(fd->addr1, fd->addr2); in flush_tlb_kernel_range_ipi() 420 struct flush_tlb_data fd; in flush_tlb_kernel_range() local [all …]
|
D | sys_sh32.c | 26 int fd[2]; in sys_sh_pipe() local 29 error = do_pipe_flags(fd, 0); in sys_sh_pipe() 31 current_pt_regs()->regs[1] = fd[1]; in sys_sh_pipe() 32 return fd[0]; in sys_sh_pipe() 37 asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf, in sys_pread_wrapper() argument 40 return sys_pread64(fd, buf, count, pos); in sys_pread_wrapper() 43 asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf, in sys_pwrite_wrapper() argument 46 return sys_pwrite64(fd, buf, count, pos); in sys_pwrite_wrapper() 49 asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1, in sys_fadvise64_64_wrapper() argument 53 return sys_fadvise64_64(fd, (u64)offset1 << 32 | offset0, in sys_fadvise64_64_wrapper() [all …]
|
/linux-4.4.14/tools/testing/selftests/powerpc/dscr/ |
D | dscr.h | 79 int fd = -1, ret; in get_default_dscr() local 83 if (fd == -1) { in get_default_dscr() 84 fd = open(DSCR_DEFAULT, O_RDONLY); in get_default_dscr() 85 if (fd == -1) { in get_default_dscr() 91 lseek(fd, 0, SEEK_SET); in get_default_dscr() 92 ret = read(fd, buf, sizeof(buf)); in get_default_dscr() 98 close(fd); in get_default_dscr() 104 int fd = -1, ret; in set_default_dscr() local 107 if (fd == -1) { in set_default_dscr() 108 fd = open(DSCR_DEFAULT, O_RDWR); in set_default_dscr() [all …]
|
D | dscr_sysfs_test.c | 19 int fd, rc; in check_cpu_dscr_default() local 21 fd = open(file, O_RDWR); in check_cpu_dscr_default() 22 if (fd == -1) { in check_cpu_dscr_default() 27 rc = read(fd, buf, sizeof(buf)); in check_cpu_dscr_default() 32 close(fd); in check_cpu_dscr_default()
|
/linux-4.4.14/arch/powerpc/kernel/ |
D | sys_ppc32.c | 66 unsigned long fd, unsigned long pgoff) in compat_sys_mmap2() argument 69 return sys_mmap(addr, len, prot, flags, fd, pgoff << 12); in compat_sys_mmap2() 77 compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count, in compat_sys_pread64() argument 80 return sys_pread64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo); in compat_sys_pread64() 83 compat_ssize_t compat_sys_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count, in compat_sys_pwrite64() argument 86 return sys_pwrite64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo); in compat_sys_pwrite64() 89 compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offhi, u32 offlo, u32 count) in compat_sys_readahead() argument 91 return sys_readahead(fd, ((loff_t)offhi << 32) | offlo, count); in compat_sys_readahead() 100 asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo, in compat_sys_fallocate() argument 103 return sys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo, in compat_sys_fallocate() [all …]
|
D | syscalls.c | 46 unsigned long fd, unsigned long off, int shift) in do_mmap2() argument 59 ret = sys_mmap_pgoff(addr, len, prot, flags, fd, off); in do_mmap2() 66 unsigned long fd, unsigned long pgoff) in sys_mmap2() argument 68 return do_mmap2(addr, len, prot, flags, fd, pgoff, PAGE_SHIFT-12); in sys_mmap2() 73 unsigned long fd, off_t offset) in sys_mmap() argument 75 return do_mmap2(addr, len, prot, flags, fd, offset, PAGE_SHIFT); in sys_mmap() 118 long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low, in ppc_fadvise64_64() argument 121 return sys_fadvise64(fd, (u64)offset_high << 32 | offset_low, in ppc_fadvise64_64()
|
/linux-4.4.14/Documentation/spi/ |
D | spidev_fdx.c | 17 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_MODE32, &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 …]
|
D | spidev_test.c | 103 static void transfer(int fd, uint8_t const *tx, uint8_t const *rx, size_t len) in transfer() argument 131 ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); in transfer() 255 int fd; in main() local 262 fd = open(device, O_RDWR); in main() 263 if (fd < 0) in main() 269 ret = ioctl(fd, SPI_IOC_WR_MODE32, &mode); in main() 273 ret = ioctl(fd, SPI_IOC_RD_MODE32, &mode); in main() 280 ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits); in main() 284 ret = ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits); in main() 291 ret = ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &speed); in main() [all …]
|
/linux-4.4.14/tools/testing/selftests/vm/ |
D | compaction_test.c | 56 int fd; in prereq() local 58 fd = open("/proc/sys/vm/compact_unevictable_allowed", in prereq() 60 if (fd < 0) { in prereq() 66 if (read(fd, &allowed, sizeof(char)) != sizeof(char)) { in prereq() 69 close(fd); in prereq() 73 close(fd); in prereq() 82 int fd; in check_compaction() local 91 fd = open("/proc/sys/vm/nr_hugepages", O_RDWR | O_NONBLOCK); in check_compaction() 92 if (fd < 0) { in check_compaction() 97 if (read(fd, initial_nr_hugepages, sizeof(initial_nr_hugepages)) <= 0) { in check_compaction() [all …]
|
D | hugepage-mmap.c | 67 int fd, ret; in main() local 69 fd = open(FILE_NAME, O_CREAT | O_RDWR, 0755); in main() 70 if (fd < 0) { in main() 75 addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, fd, 0); in main() 88 close(fd); in main()
|
/linux-4.4.14/arch/mips/kernel/ |
D | linux32.c | 65 unsigned long, prot, unsigned long, flags, unsigned long, fd, 73 error = sys_mmap_pgoff(addr, len, prot, flags, fd, 93 SYSCALL_DEFINE4(32_ftruncate64, unsigned long, fd, unsigned long, __dummy, 96 return sys_ftruncate(fd, merge_64(a2, a3)); 99 SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high, 103 return sys_llseek(fd, offset_high, offset_low, result, origin); 110 SYSCALL_DEFINE6(32_pread, unsigned long, fd, char __user *, buf, size_t, count, 113 return sys_pread64(fd, buf, count, merge_64(a4, a5)); 116 SYSCALL_DEFINE6(32_pwrite, unsigned int, fd, const char __user *, buf, 119 return sys_pwrite64(fd, buf, count, merge_64(a4, a5)); [all …]
|
D | smp.c | 349 struct flush_tlb_data *fd = info; in flush_tlb_range_ipi() local 351 local_flush_tlb_range(fd->vma, fd->addr1, fd->addr2); in flush_tlb_range_ipi() 360 struct flush_tlb_data fd = { in flush_tlb_range() local 366 smp_on_other_tlbs(flush_tlb_range_ipi, &fd); in flush_tlb_range() 381 struct flush_tlb_data *fd = info; in flush_tlb_kernel_range_ipi() local 383 local_flush_tlb_kernel_range(fd->addr1, fd->addr2); in flush_tlb_kernel_range_ipi() 388 struct flush_tlb_data fd = { in flush_tlb_kernel_range() local 393 on_each_cpu(flush_tlb_kernel_range_ipi, &fd, 1); in flush_tlb_kernel_range() 398 struct flush_tlb_data *fd = info; in flush_tlb_page_ipi() local 400 local_flush_tlb_page(fd->vma, fd->addr1); in flush_tlb_page_ipi() [all …]
|
D | syscall.c | 51 int fd[2]; in sysm_pipe() local 52 int error = do_pipe_flags(fd, 0); in sysm_pipe() 55 current_pt_regs()->regs[3] = fd[1]; in sysm_pipe() 56 return fd[0]; in sysm_pipe() 61 fd, off_t, offset) in SYSCALL_DEFINE6() argument 69 result = sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); in SYSCALL_DEFINE6() 76 unsigned long, prot, unsigned long, flags, unsigned long, fd, in SYSCALL_DEFINE6() argument 82 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT-12)); in SYSCALL_DEFINE6()
|
/linux-4.4.14/drivers/usb/gadget/ |
D | functions.c | 13 struct usb_function_driver *fd; in try_get_usb_function_instance() local 18 list_for_each_entry(fd, &func_list, list) { in try_get_usb_function_instance() 20 if (strcmp(name, fd->name)) in try_get_usb_function_instance() 23 if (!try_module_get(fd->mod)) { in try_get_usb_function_instance() 27 fi = fd->alloc_inst(); in try_get_usb_function_instance() 29 module_put(fd->mod); in try_get_usb_function_instance() 31 fi->fd = fd; in try_get_usb_function_instance() 60 f = fi->fd->alloc_func(fi); in usb_get_function() 75 mod = fi->fd->mod; in usb_put_function_instance() 92 struct usb_function_driver *fd; in usb_function_register() local [all …]
|
/linux-4.4.14/Documentation/usb/ |
D | gadget_printer.txt | 195 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-4.4.14/tools/testing/selftests/timers/ |
D | rtctest.c | 35 int i, fd, retval, irqcount = 0; in main() local 52 fd = open(rtc, O_RDONLY); in main() 54 if (fd == -1) { in main() 62 retval = ioctl(fd, RTC_UIE_ON, 0); in main() 78 retval = read(fd, &data, sizeof(unsigned long)); in main() 95 FD_SET(fd, &readfds); in main() 97 retval = select(fd+1, &readfds, NULL, NULL, &tv); in main() 103 retval = read(fd, &data, sizeof(unsigned long)); in main() 114 retval = ioctl(fd, RTC_UIE_OFF, 0); in main() 122 retval = ioctl(fd, RTC_RD_TIME, &rtc_tm); in main() [all …]
|
D | clocksource-switch.c | 53 int fd, i; in get_clocksources() local 58 fd = open("/sys/devices/system/clocksource/clocksource0/available_clocksource", O_RDONLY); in get_clocksources() 60 size = read(fd, buf, 512); in get_clocksources() 62 close(fd); in get_clocksources() 88 int fd; in get_cur_clocksource() local 90 fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_RDONLY); in get_cur_clocksource() 92 size = read(fd, buf, size); in get_cur_clocksource() 99 int fd; in change_clocksource() local 102 fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_WRONLY); in change_clocksource() 104 if (fd < 0) in change_clocksource() [all …]
|
/linux-4.4.14/drivers/net/wimax/i2400m/ |
D | debugfs.c | 244 struct dentry *fd; in i2400m_debugfs_add() local 263 fd = debugfs_create_size_t("tx_in", 0400, dentry, in i2400m_debugfs_add() 265 result = PTR_ERR(fd); in i2400m_debugfs_add() 266 if (IS_ERR(fd) && result != -ENODEV) { in i2400m_debugfs_add() 272 fd = debugfs_create_size_t("tx_out", 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_u32("state", 0600, 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() [all …]
|
/linux-4.4.14/arch/xtensa/platforms/iss/include/platform/ |
D | simcall.h | 84 static inline int simc_close(int fd) in simc_close() argument 86 return __simc(SYS_close, fd, 0, 0); in simc_close() 89 static inline int simc_ioctl(int fd, int request, void *arg) in simc_ioctl() argument 91 return __simc(SYS_ioctl, fd, request, (int) arg); in simc_ioctl() 94 static inline int simc_read(int fd, void *buf, size_t count) in simc_read() argument 96 return __simc(SYS_read, fd, (int) buf, count); in simc_read() 99 static inline int simc_write(int fd, const void *buf, size_t count) in simc_write() argument 101 return __simc(SYS_write, fd, (int) buf, count); in simc_write() 104 static inline int simc_poll(int fd) in simc_poll() argument 108 return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv); in simc_poll() [all …]
|
/linux-4.4.14/tools/testing/selftests/exec/ |
D | execveat.c | 27 static int execveat_(int fd, const char *path, char **argv, char **envp, in execveat_() argument 31 return syscall(__NR_execveat, fd, path, argv, envp, flags); in execveat_() 38 #define check_execveat_fail(fd, path, flags, errno) \ argument 39 _check_execveat_fail(fd, path, flags, errno, #errno) 40 static int _check_execveat_fail(int fd, const char *path, int flags, in _check_execveat_fail() argument 47 fd, path?:"(null)", flags, errno_str); in _check_execveat_fail() 48 rc = execveat_(fd, path, argv, envp, flags); in _check_execveat_fail() 64 static int check_execveat_invoked_rc(int fd, const char *path, int flags, in check_execveat_invoked_rc() argument 74 fd, path, (path + pathlen - 20), flags); in check_execveat_invoked_rc() 77 fd, path?:"(null)", flags); in check_execveat_invoked_rc() [all …]
|
/linux-4.4.14/tools/power/acpi/tools/ec/ |
D | ec_access.c | 126 void dump_ec(int fd) in dump_ec() argument 132 bytes_read = read(fd, buf, EC_SPACE_SIZE); in dump_ec() 152 lseek(fd, 0, SEEK_SET); in dump_ec() 155 bytes_read = read(fd, buf2, EC_SPACE_SIZE); in dump_ec() 176 void read_ec_val(int fd, int byte_offset) in read_ec_val() argument 181 error = lseek(fd, byte_offset, SEEK_SET); in read_ec_val() 185 error = read(fd, &buf, 1); in read_ec_val() 193 void write_ec_val(int fd, int byte_offset, uint8_t value) in write_ec_val() argument 197 error = lseek(fd, byte_offset, SEEK_SET); in write_ec_val() 201 error = write(fd, &value, 1); in write_ec_val() [all …]
|
/linux-4.4.14/arch/tile/kernel/ |
D | compat.c | 41 COMPAT_SYSCALL_DEFINE4(ftruncate64, unsigned int, fd, u32, dummy, in COMPAT_SYSCALL_DEFINE4() argument 44 return sys_ftruncate(fd, ((loff_t)high << 32) | low); in COMPAT_SYSCALL_DEFINE4() 47 COMPAT_SYSCALL_DEFINE6(pread64, unsigned int, fd, char __user *, ubuf, in COMPAT_SYSCALL_DEFINE6() argument 50 return sys_pread64(fd, ubuf, count, ((loff_t)high << 32) | low); in COMPAT_SYSCALL_DEFINE6() 53 COMPAT_SYSCALL_DEFINE6(pwrite64, unsigned int, fd, char __user *, ubuf, in COMPAT_SYSCALL_DEFINE6() argument 56 return sys_pwrite64(fd, ubuf, count, ((loff_t)high << 32) | low); in COMPAT_SYSCALL_DEFINE6() 59 COMPAT_SYSCALL_DEFINE6(sync_file_range2, int, fd, unsigned int, flags, in COMPAT_SYSCALL_DEFINE6() argument 63 return sys_sync_file_range(fd, ((loff_t)offset_hi << 32) | offset_lo, in COMPAT_SYSCALL_DEFINE6() 68 COMPAT_SYSCALL_DEFINE6(fallocate, int, fd, int, mode, in COMPAT_SYSCALL_DEFINE6() argument 72 return sys_fallocate(fd, mode, ((loff_t)offset_hi << 32) | offset_lo, in COMPAT_SYSCALL_DEFINE6() [all …]
|
D | sys.c | 62 ssize_t sys32_readahead(int fd, u32 offset_lo, u32 offset_hi, u32 count) in sys32_readahead() argument 64 return sys_readahead(fd, ((loff_t)offset_hi << 32) | offset_lo, count); in sys32_readahead() 67 int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, in sys32_fadvise64_64() argument 70 return sys_fadvise64_64(fd, ((loff_t)offset_hi << 32) | offset_lo, in sys32_fadvise64_64() 79 unsigned long, fd, unsigned long, off_4k) in SYSCALL_DEFINE6() argument 84 return sys_mmap_pgoff(addr, len, prot, flags, fd, in SYSCALL_DEFINE6() 91 unsigned long, fd, off_t, offset) in SYSCALL_DEFINE6() argument 95 return sys_mmap_pgoff(addr, len, prot, flags, fd, in SYSCALL_DEFINE6()
|
/linux-4.4.14/arch/x86/ia32/ |
D | sys_ia32.c | 60 asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long offset_low, in sys32_ftruncate64() argument 63 return sys_ftruncate(fd, ((loff_t) offset_high << 32) | offset_low); in sys32_ftruncate64() 119 asmlinkage long sys32_fstat64(unsigned int fd, struct stat64 __user *statbuf) in sys32_fstat64() argument 122 int ret = vfs_fstat(fd, &stat); in sys32_fstat64() 151 unsigned int fd; member 165 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, in sys32_mmap() 176 asmlinkage long sys32_pread(unsigned int fd, char __user *ubuf, u32 count, in sys32_pread() argument 179 return sys_pread64(fd, ubuf, count, in sys32_pread() 183 asmlinkage long sys32_pwrite(unsigned int fd, const char __user *ubuf, in sys32_pwrite() argument 186 return sys_pwrite64(fd, ubuf, count, in sys32_pwrite() [all …]
|
/linux-4.4.14/arch/powerpc/platforms/cell/spufs/ |
D | coredump.c | 73 static int match_context(const void *v, struct file *file, unsigned fd) in match_context() argument 81 return fd + 1; in match_context() 96 static struct spu_context *coredump_next_context(int *fd) in coredump_next_context() argument 99 int n = iterate_fd(current->files, *fd, match_context, NULL); in coredump_next_context() 102 *fd = n - 1; in coredump_next_context() 103 file = fcheck(*fd); in coredump_next_context() 110 int size = 0, rc, fd; in spufs_coredump_extra_notes_size() local 112 fd = 0; in spufs_coredump_extra_notes_size() 113 while ((ctx = coredump_next_context(&fd)) != NULL) { in spufs_coredump_extra_notes_size() 117 rc = spufs_ctx_note_size(ctx, fd); in spufs_coredump_extra_notes_size() [all …]
|
/linux-4.4.14/tools/laptop/freefall/ |
D | freefall.c | 43 int fd = open(unload_heads_path, O_RDONLY); in valid_disk() local 45 if (fd < 0) { in valid_disk() 50 close(fd); in valid_disk() 57 int fd = open(path, O_RDWR); in write_int() local 59 if (fd < 0) { in write_int() 66 if (write(fd, buf, strlen(buf)) != strlen(buf)) { in write_int() 71 close(fd); in write_int() 109 int fd, ret; in main() local 126 fd = open("/dev/freefall", O_RDONLY); in main() 127 if (fd < 0) { in main() [all …]
|
/linux-4.4.14/samples/hidraw/ |
D | hid-example.c | 44 int fd; in main() local 56 fd = open(device, O_RDWR|O_NONBLOCK); in main() 58 if (fd < 0) { in main() 68 res = ioctl(fd, HIDIOCGRDESCSIZE, &desc_size); in main() 76 res = ioctl(fd, HIDIOCGRDESC, &rpt_desc); in main() 87 res = ioctl(fd, HIDIOCGRAWNAME(256), buf); in main() 94 res = ioctl(fd, HIDIOCGRAWPHYS(256), buf); in main() 101 res = ioctl(fd, HIDIOCGRAWINFO, &info); in main() 117 res = ioctl(fd, HIDIOCSFEATURE(4), buf); in main() 125 res = ioctl(fd, HIDIOCGFEATURE(256), buf); in main() [all …]
|
/linux-4.4.14/fs/proc/ |
D | fd.c | 34 int fd = proc_fd(m->private); in seq_show() local 37 file = fcheck_files(files, fd); in seq_show() 42 if (close_on_exec(fd, fdt)) in seq_show() 89 int fd; in tid_fd_revalidate() local 96 fd = proc_fd(inode); in tid_fd_revalidate() 104 file = fcheck_files(files, fd); in tid_fd_revalidate() 161 int fd = proc_fd(d_inode(dentry)); in proc_fd_link() local 165 fd_file = fcheck_files(files, fd); in proc_fd_link() 182 unsigned fd = (unsigned long)ptr; in proc_fd_instantiate() local 191 ei->fd = fd; in proc_fd_instantiate() [all …]
|
/linux-4.4.14/arch/parisc/kernel/ |
D | sys_parisc.c | 265 unsigned long prot, unsigned long flags, unsigned long fd, in sys_mmap2() argument 270 return sys_mmap_pgoff(addr, len, prot, flags, fd, in sys_mmap2() 275 unsigned long prot, unsigned long flags, unsigned long fd, in sys_mmap() argument 279 return sys_mmap_pgoff(addr, len, prot, flags, fd, in sys_mmap() 295 asmlinkage long parisc_ftruncate64(unsigned int fd, in parisc_ftruncate64() argument 298 return sys_ftruncate(fd, (long)high << 32 | low); in parisc_ftruncate64() 307 asmlinkage long sys_ftruncate64(unsigned int fd, unsigned long length) in sys_ftruncate64() argument 309 return sys_ftruncate(fd, length); in sys_ftruncate64() 311 asmlinkage long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) in sys_fcntl64() argument 313 return sys_fcntl(fd, cmd, arg); in sys_fcntl64() [all …]
|
/linux-4.4.14/arch/metag/kernel/ |
D | sys_metag.c | 42 unsigned long fd, unsigned long pgoff) in sys_mmap2() argument 50 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); in sys_mmap2() 113 asmlinkage long sys_ftruncate64_metag(unsigned int fd, unsigned long lo, in sys_ftruncate64_metag() argument 116 return sys_ftruncate64(fd, merge_64(hi, lo)); in sys_ftruncate64_metag() 119 asmlinkage long sys_fadvise64_64_metag(int fd, unsigned long offs_lo, in sys_fadvise64_64_metag() argument 124 return sys_fadvise64_64(fd, merge_64(offs_hi, offs_lo), in sys_fadvise64_64_metag() 128 asmlinkage long sys_readahead_metag(int fd, unsigned long lo, unsigned long hi, in sys_readahead_metag() argument 131 return sys_readahead(fd, merge_64(hi, lo), count); in sys_readahead_metag() 134 asmlinkage ssize_t sys_pread64_metag(unsigned long fd, char __user *buf, in sys_pread64_metag() argument 138 return sys_pread64(fd, buf, count, merge_64(hi, lo)); in sys_pread64_metag() [all …]
|
/linux-4.4.14/Documentation/mic/mpssd/ |
D | sysfs.c | 31 int fd; in readsysfs() local 40 fd = open(filename, O_RDONLY); in readsysfs() 41 if (fd < 0) { in readsysfs() 47 len = read(fd, value, sizeof(value)); in readsysfs() 63 close(fd); in readsysfs() 72 int fd, ret = 0; in setsysfs() local 82 fd = open(filename, O_RDWR); in setsysfs() 83 if (fd < 0) { in setsysfs() 91 if (write(fd, value, strlen(value)) < 0) { in setsysfs() 97 close(fd); in setsysfs()
|
D | mpssd.c | 233 int fd, err; in tun_alloc() local 237 fd = open("/dev/net/tun", O_RDWR); in tun_alloc() 238 if (fd < 0) { in tun_alloc() 249 err = ioctl(fd, TUNSETIFF, (void *)&ifr); in tun_alloc() 253 close(fd); in tun_alloc() 259 err = ioctl(fd, TUNSETOFFLOAD, offload); in tun_alloc() 263 close(fd); in tun_alloc() 270 return fd; in tun_alloc() 401 mic_virtio_copy(struct mic_info *mic, int fd, in mic_virtio_copy() argument 406 ret = ioctl(fd, MIC_VIRTIO_COPY_DESC, copy); in mic_virtio_copy() [all …]
|
/linux-4.4.14/Documentation/watchdog/src/ |
D | watchdog-test.c | 15 int fd; variable 26 ioctl(fd, WDIOC_KEEPALIVE, &dummy); in keep_alive() 36 close(fd); in term() 46 fd = open("/dev/watchdog", O_WRONLY); in main() 48 if (fd == -1) { in main() 57 ioctl(fd, WDIOC_SETOPTIONS, &flags); in main() 63 ioctl(fd, WDIOC_SETOPTIONS, &flags); in main() 69 ioctl(fd, WDIOC_SETTIMEOUT, &flags); in main() 96 close(fd); in main()
|
D | watchdog-simple.c | 8 int fd = open("/dev/watchdog", O_WRONLY); in main() local 10 if (fd == -1) { in main() 15 ret = write(fd, "\0", 1); in main() 22 close(fd); in main()
|
/linux-4.4.14/arch/sparc/kernel/ |
D | systbls.h | 18 unsigned long fd, unsigned long off); 24 unsigned long fd, unsigned long pgoff); 55 asmlinkage long sys32_ftruncate64(unsigned int fd, 63 asmlinkage long compat_sys_fstat64(unsigned int fd, 68 asmlinkage compat_ssize_t sys32_pread64(unsigned int fd, 73 asmlinkage compat_ssize_t sys32_pwrite64(unsigned int fd, 78 asmlinkage long compat_sys_readahead(int fd, 82 long compat_sys_fadvise64(int fd, 86 long compat_sys_fadvise64_64(int fd, 90 long sys32_sync_file_range(unsigned int fd, [all …]
|
D | sys_sparc32.c | 62 asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low) in sys32_ftruncate64() argument 67 return sys_ftruncate(fd, (high << 32) | low); in sys32_ftruncate64() 122 asmlinkage long compat_sys_fstat64(unsigned int fd, in compat_sys_fstat64() argument 126 int error = vfs_fstat(fd, &stat); in compat_sys_fstat64() 198 asmlinkage compat_ssize_t sys32_pread64(unsigned int fd, in sys32_pread64() argument 204 return sys_pread64(fd, ubuf, count, (poshi << 32) | poslo); in sys32_pread64() 207 asmlinkage compat_ssize_t sys32_pwrite64(unsigned int fd, in sys32_pwrite64() argument 213 return sys_pwrite64(fd, ubuf, count, (poshi << 32) | poslo); in sys32_pwrite64() 216 asmlinkage long compat_sys_readahead(int fd, in compat_sys_readahead() argument 221 return sys_readahead(fd, (offhi << 32) | offlo, count); in compat_sys_readahead() [all …]
|
D | sys_sparc_32.c | 75 int fd[2]; in sparc_pipe() local 78 error = do_pipe_flags(fd, 0); in sparc_pipe() 81 regs->u_regs[UREG_I1] = fd[1]; in sparc_pipe() 82 error = fd[0]; in sparc_pipe() 99 unsigned long prot, unsigned long flags, unsigned long fd, in sys_mmap2() argument 104 return sys_mmap_pgoff(addr, len, prot, flags, fd, in sys_mmap2() 109 unsigned long prot, unsigned long flags, unsigned long fd, in sys_mmap() argument 113 return sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT); in sys_mmap()
|
/linux-4.4.14/init/ |
D | do_mounts_md.c | 133 int fd; in md_setup_drive() local 183 fd = sys_open(name, 0, 0); in md_setup_drive() 184 if (fd < 0) { in md_setup_drive() 189 if (sys_ioctl(fd, SET_ARRAY_INFO, 0) == -EBUSY) { in md_setup_drive() 193 sys_close(fd); in md_setup_drive() 212 err = sys_ioctl(fd, SET_ARRAY_INFO, (long)&ainfo); in md_setup_drive() 222 err = sys_ioctl(fd, ADD_NEW_DISK, (long)&dinfo); in md_setup_drive() 232 sys_ioctl(fd, ADD_NEW_DISK, (long)&dinfo); in md_setup_drive() 236 err = sys_ioctl(fd, RUN_ARRAY, 0); in md_setup_drive() 245 sys_close(fd); in md_setup_drive() [all …]
|
D | do_mounts_initrd.c | 101 int fd = sys_open("/dev/root.old", O_RDWR, 0); in handle_initrd() local 109 if (fd < 0) { in handle_initrd() 110 error = fd; in handle_initrd() 112 error = sys_ioctl(fd, BLKFLSBUF, 0); in handle_initrd() 113 sys_close(fd); in handle_initrd()
|
/linux-4.4.14/tools/usb/usbip/libsrc/ |
D | sysfs_utils.c | 12 int fd; in write_sysfs_attribute() local 15 fd = open(attr_path, O_WRONLY); in write_sysfs_attribute() 16 if (fd < 0) { in write_sysfs_attribute() 21 length = write(fd, new_value, len); in write_sysfs_attribute() 24 close(fd); in write_sysfs_attribute() 28 close(fd); in write_sysfs_attribute()
|
/linux-4.4.14/arch/mips/include/asm/ |
D | pmon.h | 34 #define pmon_close(fd) debug_vectors->close(fd) argument 35 #define pmon_read(fd, buf, count) debug_vectors->read(fd, buf, count) argument 36 #define pmon_write(fd, buf, count) debug_vectors->write(fd, buf, count) argument 37 #define pmon_lseek(fd, off, whence) debug_vectors->lseek(fd, off, whence) argument
|
/linux-4.4.14/scripts/basic/ |
D | fixdep.c | 268 int fd; in do_config_file() local 271 fd = open(filename, O_RDONLY); in do_config_file() 272 if (fd < 0) { in do_config_file() 277 fstat(fd, &st); in do_config_file() 279 close(fd); in do_config_file() 282 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in do_config_file() 285 close(fd); in do_config_file() 293 close(fd); in do_config_file() 384 int fd; in print_deps() local 387 fd = open(depfile, O_RDONLY); in print_deps() [all …]
|
/linux-4.4.14/Documentation/laptops/ |
D | dslm.c | 29 static int check_powermode(int fd) in check_powermode() argument 34 if (ioctl(fd, HDIO_DRIVE_CMD, &args) in check_powermode() 36 && ioctl(fd, HDIO_DRIVE_CMD, &args)) { in check_powermode() 66 static void measure(int fd) in measure() argument 83 last_state = check_powermode(fd); in measure() 89 curr_state = check_powermode(fd); in measure() 134 int fd; in main() local 147 if (!(fd = open(disk, O_RDONLY|O_NONBLOCK))) { in main() 161 measure(fd); in main() 163 close(fd); in main()
|
/linux-4.4.14/Documentation/ptp/ |
D | testptp.c | 60 static clockid_t get_clockid(int fd) in get_clockid() argument 63 #define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD) in get_clockid() argument 65 return FD_TO_CLOCKID(fd); in get_clockid() 163 int i, c, cnt, fd; in main() local 258 fd = open(device, O_RDWR); in main() 259 if (fd < 0) { in main() 264 clkid = get_clockid(fd); in main() 271 if (ioctl(fd, PTP_CLOCK_GETCAPS, &caps)) { in main() 354 if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) { in main() 361 cnt = read(fd, &event, sizeof(event)); in main() [all …]
|
/linux-4.4.14/arch/um/os-Linux/drivers/ |
D | tuntap_user.c | 34 if ((pri->fd == -1) || pri->fixed_config) in tuntap_add_addr() 44 if ((pri->fd == -1) || pri->fixed_config) in tuntap_del_addr() 140 pri->fd = os_open_file("/dev/net/tun", in tuntap_open() 142 if (pri->fd < 0) { in tuntap_open() 144 "err = %d\n", -pri->fd); in tuntap_open() 145 return pri->fd; in tuntap_open() 150 if (ioctl(pri->fd, TUNSETIFF, &ifr) < 0) { in tuntap_open() 154 close(pri->fd); in tuntap_open() 172 err = tuntap_open_tramp(pri->gate_addr, &pri->fd, fds[0], in tuntap_open() 193 return pri->fd; in tuntap_open() [all …]
|
D | tuntap_kern.c | 29 tpri->fd = -1; in tuntap_init() 38 static int tuntap_read(int fd, struct sk_buff *skb, struct uml_net_private *lp) in tuntap_read() argument 40 return net_read(fd, skb_mac_header(skb), in tuntap_read() 44 static int tuntap_write(int fd, struct sk_buff *skb, struct uml_net_private *lp) in tuntap_write() argument 46 return net_write(fd, skb->data, skb->len); in tuntap_write()
|
/linux-4.4.14/Documentation/ia64/ |
D | aliasing-test.c | 29 int fd, rc; in map_mem() local 33 fd = open(path, O_RDWR); in map_mem() 34 if (fd == -1) { in map_mem() 40 rc = ioctl(fd, PCIIOC_MMAP_IS_MEM); in map_mem() 45 addr = mmap(NULL, length, PROT_READ|PROT_WRITE, MAP_SHARED, fd, offset); in map_mem() 61 close(fd); in map_mem() 124 int fd, rc; in read_rom() local 127 fd = open(path, O_RDWR); in read_rom() 128 if (fd == -1) { in read_rom() 133 rc = write(fd, "1", 2); in read_rom() [all …]
|
/linux-4.4.14/arch/ia64/hp/sim/boot/ |
D | bootloader.c | 32 int fd; member 60 int fd, i; in start_bootloader() local 98 fd = ssc((long) kpath, 1, 0, 0, SSC_OPEN); in start_bootloader() 100 if (fd < 0) { in start_bootloader() 105 stat.fd = fd; in start_bootloader() 110 ssc(fd, 1, (long) &req, off, SSC_READ); in start_bootloader() 138 ssc(fd, 1, (long) &req, e_phoff, SSC_READ); in start_bootloader() 153 ssc(fd, 1, (long) &req, elf_phdr->p_offset, SSC_READ); in start_bootloader() 158 ssc(fd, 0, 0, 0, SSC_CLOSE); in start_bootloader()
|
/linux-4.4.14/Documentation/filesystems/ |
D | inotify.txt | 12 Q: What is the design decision behind not tying the watch to the open fd of 21 Q: What is the design decision behind using an-fd-per-instance as opposed to 22 an fd-per-watch? 24 A: An fd-per-watch quickly consumes more file descriptors than are allowed, 25 more fd's than are feasible to manage, and more fd's than are optimally 26 select()-able. Yes, root can bump the per-process fd limit and yes, users 31 fd and no twiddling with fd limits. Initializing an inotify instance two 36 There are other good arguments. With a single fd, there is a single 38 fd returns all watch events and also any potential out-of-band data. If 39 every fd was a separate watch, [all …]
|
D | dnotify_test.c | 18 int fd; in main() local 25 fd = open(".", O_RDONLY); in main() 26 fcntl(fd, F_SETSIG, SIGRTMIN + 1); in main() 27 fcntl(fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_MULTISHOT); in main()
|
D | files.txt | 14 a put_files_struct() frees the file descriptor (fd) table. 21 elements - the fd sets (open_fds and close_on_exec, the 27 which the actual fd table is accessed. Initially the 58 3. For any update to the fd table, files->file_lock must 61 4. To look up the file structure given an fd, a reader 69 file = fcheck(fd); 77 of the fd (fget()/fget_light()) are lock-free, it is possible 83 file = fcheck_files(files, fd); 112 fd = locate_fd(files, file, start); 113 if (fd >= 0) { [all …]
|
/linux-4.4.14/tools/usb/ |
D | testusb.c | 141 static int testdev_ffs_ifnum(FILE *fd) in testdev_ffs_ifnum() argument 149 if (fread(u.buf, 1, 1, fd) != 1) in testdev_ffs_ifnum() 151 if (fread(u.buf + 1, (unsigned char)u.buf[0] - 1, 1, fd) != 1) in testdev_ffs_ifnum() 164 static int testdev_ifnum(FILE *fd) in testdev_ifnum() argument 168 if (fread(&dev, sizeof dev, 1, fd) != 1) in testdev_ifnum() 214 return testdev_ffs_ifnum(fd); in testdev_ifnum() 241 return testdev_ffs_ifnum(fd); in testdev_ifnum() 248 FILE *fd; in find_testdev() local 257 fd = fopen(name, "rb"); in find_testdev() 258 if (!fd) { in find_testdev() [all …]
|
/linux-4.4.14/arch/powerpc/boot/ |
D | hack-coff.c | 34 int fd; in main() local 45 if ((fd = open(av[1], 2)) == -1) { in main() 49 if (read(fd, &fhdr, sizeof(fhdr)) != sizeof(fhdr)) in main() 57 if (read(fd, &aout, aoutsz) != aoutsz) in main() 61 if (read(fd, &shdr, sizeof(shdr)) != sizeof(shdr)) in main() 73 if (lseek(fd, (long) sizeof(struct external_filehdr), 0) == -1 in main() 74 || write(fd, &aout, aoutsz) != aoutsz) { in main() 78 close(fd); in main()
|
/linux-4.4.14/tools/build/ |
D | fixdep.c | 122 int fd; in print_deps() local 125 fd = open(depfile, O_RDONLY); in print_deps() 126 if (fd < 0) { in print_deps() 131 if (fstat(fd, &st) < 0) { in print_deps() 138 close(fd); in print_deps() 141 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in print_deps() 144 close(fd); in print_deps() 152 close(fd); in print_deps()
|
/linux-4.4.14/tools/perf/arch/x86/tests/ |
D | intel-cqm.c | 41 int i, fd[2], flag, ret; in test__intel_cqm_count_nmi_context() local 80 fd[0] = sys_perf_event_open(&pe, pid, -1, -1, flag); in test__intel_cqm_count_nmi_context() 81 if (fd[0] < 0) { in test__intel_cqm_count_nmi_context() 92 fd[1] = sys_perf_event_open(&pe, pid, -1, fd[0], flag); in test__intel_cqm_count_nmi_context() 93 if (fd[1] < 0) { in test__intel_cqm_count_nmi_context() 104 event = mmap(NULL, mmap_len, PROT_READ, MAP_SHARED, fd[0], 0); in test__intel_cqm_count_nmi_context() 117 close(fd[i]); in test__intel_cqm_count_nmi_context()
|
D | rdpmc.c | 93 int fd; in __test__rdpmc() local 108 fd = sys_perf_event_open(&attr, 0, -1, -1, in __test__rdpmc() 110 if (fd < 0) { in __test__rdpmc() 112 "with %d (%s)\n", fd, in __test__rdpmc() 117 addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0); in __test__rdpmc() 144 close(fd); in __test__rdpmc()
|
/linux-4.4.14/arch/mn10300/boot/tools/ |
D | build.c | 43 int fd; variable 58 fd = open(name, O_RDONLY, 0); in file_open() 59 if (fd < 0) in file_open() 108 i = read(fd, buf, sizeof(buf)); in main() 118 close(fd); in main() 122 for (i = 0; (c = read(fd, buf, sizeof(buf))) > 0; i += c) in main() 127 close(fd); in main() 146 if (fstat(fd, &sb)) in main() 163 n = read(fd, buf, l); in main() 174 close(fd); in main()
|
/linux-4.4.14/arch/s390/kernel/ |
D | compat_linux.h | 92 long compat_sys_s390_fchown16(unsigned int fd, u16 user, u16 group); 110 long compat_sys_s390_ftruncate64(unsigned int fd, u32 high, u32 low); 111 long compat_sys_s390_pread64(unsigned int fd, char __user *ubuf, compat_size_t count, u32 high, u32… 112 long compat_sys_s390_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count, u32 hi… 113 long compat_sys_s390_readahead(int fd, u32 high, u32 low, s32 count); 116 long compat_sys_s390_fstat64(unsigned int fd, struct stat64_emu31 __user *statbuf); 120 long compat_sys_s390_read(unsigned int fd, char __user * buf, compat_size_t count); 121 long compat_sys_s390_write(unsigned int fd, const char __user * buf, compat_size_t count); 122 long compat_sys_s390_fadvise64(int fd, u32 high, u32 low, compat_size_t len, int advise); 124 long compat_sys_s390_sync_file_range(int fd, u32 offhigh, u32 offlow, u32 nhigh, u32 nlow, unsigned… [all …]
|
D | compat_linux.c | 101 COMPAT_SYSCALL_DEFINE3(s390_fchown16, unsigned int, fd, u16, user, u16, group) in COMPAT_SYSCALL_DEFINE3() argument 103 return sys_fchown(fd, low2highuid(user), low2highgid(group)); in COMPAT_SYSCALL_DEFINE3() 307 COMPAT_SYSCALL_DEFINE3(s390_ftruncate64, unsigned int, fd, u32, high, u32, low) in COMPAT_SYSCALL_DEFINE3() argument 309 return sys_ftruncate(fd, (unsigned long)high << 32 | low); in COMPAT_SYSCALL_DEFINE3() 312 COMPAT_SYSCALL_DEFINE5(s390_pread64, unsigned int, fd, char __user *, ubuf, in COMPAT_SYSCALL_DEFINE5() argument 317 return sys_pread64(fd, ubuf, count, (unsigned long)high << 32 | low); in COMPAT_SYSCALL_DEFINE5() 320 COMPAT_SYSCALL_DEFINE5(s390_pwrite64, unsigned int, fd, const char __user *, ubuf, in COMPAT_SYSCALL_DEFINE5() argument 325 return sys_pwrite64(fd, ubuf, count, (unsigned long)high << 32 | low); in COMPAT_SYSCALL_DEFINE5() 328 COMPAT_SYSCALL_DEFINE4(s390_readahead, int, fd, u32, high, u32, low, s32, count) in COMPAT_SYSCALL_DEFINE4() argument 330 return sys_readahead(fd, (unsigned long)high << 32 | low, count); in COMPAT_SYSCALL_DEFINE4() [all …]
|
/linux-4.4.14/tools/power/x86/x86_energy_perf_policy/ |
D | x86_energy_perf_policy.c | 192 int fd; in get_msr() local 195 fd = open(msr_path, O_RDONLY); in get_msr() 196 if (fd < 0) { in get_msr() 202 retval = pread(fd, &msr, sizeof msr, offset); in get_msr() 208 close(fd); in get_msr() 217 int fd; in put_msr() local 220 fd = open(msr_path, O_RDWR); in put_msr() 221 if (fd < 0) { in put_msr() 226 retval = pread(fd, &old_msr, sizeof old_msr, offset); in put_msr() 233 retval = pwrite(fd, &new_msr, sizeof new_msr, offset); in put_msr() [all …]
|
/linux-4.4.14/arch/c6x/include/asm/ |
D | syscalls.h | 27 extern long sys_pread_c6x(unsigned int fd, char __user *buf, 29 extern long sys_pwrite_c6x(unsigned int fd, const char __user *buf, 33 extern long sys_ftruncate64_c6x(unsigned int fd, 35 extern long sys_fadvise64_c6x(int fd, u32 offset_lo, u32 offset_hi, 37 extern long sys_fadvise64_64_c6x(int fd, u32 offset_lo, u32 offset_hi, 39 extern long sys_fallocate_c6x(int fd, int mode,
|
/linux-4.4.14/arch/tile/include/asm/ |
D | syscalls.h | 35 ssize_t sys32_readahead(int fd, u32 offset_lo, u32 offset_hi, u32 count); 36 long sys32_fadvise64(int fd, u32 offset_lo, u32 offset_hi, 38 int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, 53 long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg); 54 long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf); 56 long sys_ftruncate64(unsigned int fd, loff_t length);
|
/linux-4.4.14/fs/notify/fanotify/ |
D | fanotify_user.c | 134 metadata->fd = FAN_NOFD; in fill_event_metadata() 136 metadata->fd = create_fd(group, event, file); in fill_event_metadata() 137 if (metadata->fd < 0) in fill_event_metadata() 138 ret = metadata->fd; in fill_event_metadata() 146 struct fsnotify_group *group, int fd) in dequeue_event() argument 153 if (event->fd != fd) in dequeue_event() 171 int fd = response_struct->fd; in process_access_response() local 175 fd, response); in process_access_response() 189 if (fd < 0) in process_access_response() 192 event = dequeue_event(group, fd); in process_access_response() [all …]
|
/linux-4.4.14/tools/testing/selftests/net/ |
D | psock_fanout.c | 76 int fd, val; in sock_fanout_open() local 78 fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); in sock_fanout_open() 79 if (fd < 0) { in sock_fanout_open() 86 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT, &val, sizeof(val))) { in sock_fanout_open() 87 if (close(fd)) { in sock_fanout_open() 94 pair_udp_setfilter(fd); in sock_fanout_open() 95 return fd; in sock_fanout_open() 98 static void sock_fanout_set_ebpf(int fd) in sock_fanout_set_ebpf() argument 132 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &pfd, sizeof(pfd))) { in sock_fanout_set_ebpf() 143 static char *sock_fanout_open_ring(int fd) in sock_fanout_open_ring() argument [all …]
|
/linux-4.4.14/Documentation/networking/timestamping/ |
D | txtimestamp.c | 167 static void __poll(int fd) in __poll() argument 173 pollfd.fd = fd; in __poll() 231 static int recv_errmsg(int fd) in recv_errmsg() argument 256 ret = recvmsg(fd, &msg, MSG_ERRQUEUE); in recv_errmsg() 273 int fd, i, val = 1, total_len; in do_test() local 292 fd = socket(family, cfg_proto, cfg_ipproto); in do_test() 293 if (fd < 0) in do_test() 297 if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, in do_test() 302 if (connect(fd, (void *) &daddr, sizeof(daddr))) in do_test() 305 if (connect(fd, (void *) &daddr6, sizeof(daddr6))) in do_test() [all …]
|
/linux-4.4.14/tools/power/cpupower/debug/i386/ |
D | powernow-k8-decode.c | 32 int fd; in get_fidvid() local 40 fd = open(file, O_RDONLY); in get_fidvid() 41 if (fd < 0) in get_fidvid() 43 lseek(fd, MSR_FIDVID_STATUS, SEEK_CUR); in get_fidvid() 44 if (read(fd, &msr, 8) != 8) in get_fidvid() 51 close(fd); in get_fidvid()
|
D | centrino-decode.c | 32 int fd; in rdmsr() local 43 fd = open(file, O_RDONLY); in rdmsr() 45 if (fd < 0) in rdmsr() 48 if (lseek(fd, msr, SEEK_CUR) == -1) in rdmsr() 51 if (read(fd, &val, 8) != 8) in rdmsr() 59 close(fd); in rdmsr()
|
/linux-4.4.14/tools/power/acpi/os_specific/service_layers/ |
D | osunixmap.c | 102 int fd; in acpi_os_map_memory() local 104 fd = open(SYSTEM_MEMORY, O_RDONLY | O_BINARY); in acpi_os_map_memory() 105 if (fd < 0) { in acpi_os_map_memory() 118 fd, (where - offset)); in acpi_os_map_memory() 121 close(fd); in acpi_os_map_memory() 125 close(fd); in acpi_os_map_memory()
|
/linux-4.4.14/arch/ia64/kernel/ |
D | sys_ia64.c | 103 int fd[2]; in sys_ia64_pipe() local 106 retval = do_pipe_flags(fd, 0); in sys_ia64_pipe() 109 retval = fd[0]; in sys_ia64_pipe() 110 regs->r9 = fd[1]; in sys_ia64_pipe() 137 sys_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, long pgoff) in sys_mmap2() argument 139 addr = sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); in sys_mmap2() 146 sys_mmap (unsigned long addr, unsigned long len, int prot, int flags, int fd, long off) in sys_mmap() argument 151 addr = sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT); in sys_mmap()
|
/linux-4.4.14/arch/arm/kernel/ |
D | sys_oabi-compat.c | 164 asmlinkage long sys_oabi_fstat64(unsigned long fd, in sys_oabi_fstat64() argument 168 int error = vfs_fstat(fd, &stat); in sys_oabi_fstat64() 196 static long do_locks(unsigned int fd, unsigned int cmd, in do_locks() argument 215 ret = sys_fcntl64(fd, cmd, (unsigned long)&kernel); in do_locks() 231 asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd, in sys_oabi_fcntl64() argument 241 return do_locks(fd, cmd, arg); in sys_oabi_fcntl64() 244 return sys_fcntl64(fd, cmd, arg); in sys_oabi_fcntl64() 253 asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd, in sys_oabi_epoll_ctl() argument 262 return sys_epoll_ctl(epfd, op, fd, NULL); in sys_oabi_epoll_ctl() 269 ret = sys_epoll_ctl(epfd, op, fd, &kernel); in sys_oabi_epoll_ctl() [all …]
|
/linux-4.4.14/drivers/net/ethernet/toshiba/ |
D | tc35815.c | 363 struct FDesc fd; member 369 struct FDesc fd; member 374 struct FDesc fd; member 943 lp->rfd_base[i].fd.FDCtl = cpu_to_le32(FD_CownsFD); in tc35815_init_queues() 951 lp->tfd_base[i].fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, &lp->tfd_base[i+1])); in tc35815_init_queues() 952 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_init_queues() 953 lp->tfd_base[i].fd.FDCtl = cpu_to_le32(0); in tc35815_init_queues() 955 lp->tfd_base[TX_FD_NUM-1].fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, &lp->tfd_base[0])); in tc35815_init_queues() 961 lp->fbl_ptr->fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, lp->fbl_ptr)); in tc35815_init_queues() 962 lp->fbl_ptr->fd.FDCtl = cpu_to_le32(RX_BUF_NUM | FD_CownsFD); in tc35815_init_queues() [all …]
|
/linux-4.4.14/arch/ia64/hp/sim/ |
D | simeth.c | 131 netdev_attach(int fd, int irq, unsigned int ipaddr) in netdev_attach() argument 134 return ia64_ssc(fd, ipaddr, 0,0, SSC_NETDEV_ATTACH); in netdev_attach() 139 netdev_detach(int fd) in netdev_detach() argument 143 return ia64_ssc(fd, 0,0,0, SSC_NETDEV_DETACH); in netdev_detach() 147 netdev_send(int fd, unsigned char *buf, unsigned int len) in netdev_send() argument 149 return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_SEND); in netdev_send() 153 netdev_read(int fd, unsigned char *buf, unsigned int len) in netdev_read() argument 155 return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV); in netdev_read() 184 int fd, err, rc; in simeth_probe1() local 196 fd = netdev_probe(simeth_device, mac_addr); in simeth_probe1() [all …]
|
/linux-4.4.14/arch/tile/include/gxio/ |
D | iorpc_globals.h | 30 int __iorpc_arm_pollfd(int fd, int pollfd_cookie); 32 int __iorpc_close_pollfd(int fd, int pollfd_cookie); 34 int __iorpc_get_mmio_base(int fd, HV_PTE *base); 36 int __iorpc_check_mmio_offset(int fd, unsigned long offset, unsigned long size);
|
/linux-4.4.14/tools/testing/selftests/powerpc/pmu/ |
D | event.c | 54 e->fd = perf_event_open(&e->attr, pid, cpu, group_fd, 0); in event_open_with_options() 55 if (e->fd == -1) { in event_open_with_options() 85 close(e->fd); in event_close() 90 return ioctl(e->fd, PERF_EVENT_IOC_ENABLE); in event_enable() 95 return ioctl(e->fd, PERF_EVENT_IOC_DISABLE); in event_disable() 100 return ioctl(e->fd, PERF_EVENT_IOC_RESET); in event_reset() 107 rc = read(e->fd, &e->result, sizeof(e->result)); in event_read()
|
/linux-4.4.14/arch/score/kernel/ |
D | sys_score.c | 38 unsigned long flags, unsigned long fd, unsigned long pgoff) in sys_mmap2() argument 40 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); in sys_mmap2() 45 unsigned long flags, unsigned long fd, off_t offset) in sys_mmap() argument 49 return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); in sys_mmap()
|
/linux-4.4.14/arch/microblaze/kernel/ |
D | sys_microblaze.c | 37 unsigned long, prot, unsigned long, flags, unsigned long, fd, in SYSCALL_DEFINE6() argument 43 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); in SYSCALL_DEFINE6() 47 unsigned long, prot, unsigned long, flags, unsigned long, fd, in SYSCALL_DEFINE6() argument 53 return sys_mmap_pgoff(addr, len, prot, flags, fd, in SYSCALL_DEFINE6()
|
/linux-4.4.14/arch/alpha/boot/tools/ |
D | objstrip.c | 55 int fd, ofd, i, j, verbose = 0, primary = 0; in main() local 90 fd = open(inname, O_RDONLY); in main() 91 if (fd == -1) { in main() 117 if (fstat(fd, &st) == -1) { in main() 142 if (read(fd, buf, sizeof(buf)) < 0) { in main() 169 lseek(fd, elf->e_phoff, SEEK_SET); in main() 170 if (read(fd, buf, sizeof(*elf_phdr)) != sizeof(*elf_phdr)) { in main() 227 if (lseek(fd, offset, SEEK_SET) != offset) { in main() 244 if ((size_t) read(fd, buf, n) != n) { in main()
|
/linux-4.4.14/drivers/vfio/platform/ |
D | vfio_platform_irq.c | 61 int32_t fd = *(int32_t *)data; in vfio_platform_set_irq_mask() local 63 if (fd >= 0) in vfio_platform_set_irq_mask() 67 &vdev->irqs[index].mask, fd); in vfio_platform_set_irq_mask() 121 int32_t fd = *(int32_t *)data; in vfio_platform_set_irq_unmask() local 123 if (fd >= 0) in vfio_platform_set_irq_unmask() 128 fd); in vfio_platform_set_irq_unmask() 181 int fd, irq_handler_t handler) in vfio_set_trigger() argument 195 if (fd < 0) /* Disable only */ in vfio_set_trigger() 203 trigger = eventfd_ctx_fdget(fd); in vfio_set_trigger() 246 int32_t fd = *(int32_t *)data; in vfio_platform_set_irq_trigger() local [all …]
|
/linux-4.4.14/scripts/dtc/ |
D | util.c | 203 int fd = 0; /* assume stdin */ in utilfdt_read_err_len() local 210 fd = open(filename, O_RDONLY); in utilfdt_read_err_len() 211 if (fd < 0) in utilfdt_read_err_len() 224 ret = read(fd, &buf[offset], bufsize - offset); in utilfdt_read_err_len() 233 close(fd); in utilfdt_read_err_len() 270 int fd = 1; /* assume stdout */ in utilfdt_write_err() local 277 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666); in utilfdt_write_err() 278 if (fd < 0) in utilfdt_write_err() 286 ret = write(fd, ptr + offset, totalsize - offset); in utilfdt_write_err() 294 if (fd != 1) in utilfdt_write_err() [all …]
|
/linux-4.4.14/arch/xtensa/platforms/iss/ |
D | simdisk.c | 36 int fd; member 88 simc_lseek(dev->fd, offset, SEEK_SET); in simdisk_transfer() 90 io = simc_write(dev->fd, buffer, nbytes); in simdisk_transfer() 92 io = simc_read(dev->fd, buffer, nbytes); in simdisk_transfer() 164 if (dev->fd != -1) { in simdisk_attach() 168 dev->fd = simc_open(filename, O_RDWR, 0); in simdisk_attach() 169 if (dev->fd == -1) { in simdisk_attach() 174 dev->size = simc_lseek(dev->fd, 0, SEEK_END); in simdisk_attach() 194 } else if (dev->fd != -1) { in simdisk_detach() 195 if (simc_close(dev->fd)) { in simdisk_detach() [all …]
|
/linux-4.4.14/Documentation/accounting/ |
D | getdelays.c | 90 int fd; in create_nl_socket() local 93 fd = socket(AF_NETLINK, SOCK_RAW, protocol); in create_nl_socket() 94 if (fd < 0) in create_nl_socket() 98 if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, in create_nl_socket() 108 if (bind(fd, (struct sockaddr *) &local, sizeof(local)) < 0) in create_nl_socket() 111 return fd; in create_nl_socket() 113 close(fd); in create_nl_socket() 268 int fd = 0; in main() local 370 fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, in main() 372 if (fd == -1) { in main() [all …]
|
/linux-4.4.14/Documentation/ioctl/ |
D | cdrom.txt | 101 ioctl(fd, CDROMPAUSE, 0); 115 ioctl(fd, CDROMRESUME, 0); 130 ioctl(fd, CDROMPLAYMSF, &msf); 154 ioctl(fd, CDROMPLAYTRKIND, &ti); 175 ioctl(fd, CDROMREADTOCHDR, &header); 193 ioctl(fd, CDROMREADTOCENTRY, &entry); 218 ioctl(fd, CDROMSTOP, 0); 236 ioctl(fd, CDROMSTART, 0); 255 ioctl(fd, CDROMEJECT, 0); 274 ioctl(fd, CDROMCLOSETRAY, 0); [all …]
|
/linux-4.4.14/include/uapi/linux/ |
D | if_pppol2tp.h | 27 int fd; /* FD of UDP socket to use */ member 41 int fd; /* FD of UDP socket to use */ member 55 int fd; /* FD of UDP or IP socket to use */ member 66 int fd; /* FD of UDP or IP socket to use */ member
|
/linux-4.4.14/drivers/video/console/ |
D | fbcon.h | 155 #define REFCOUNT(fd) (((int *)(fd))[-1]) argument 156 #define FNTSIZE(fd) (((int *)(fd))[-2]) argument 157 #define FNTCHARCNT(fd) (((int *)(fd))[-3]) argument 158 #define FNTSUM(fd) (((int *)(fd))[-4]) argument
|
/linux-4.4.14/drivers/vfio/pci/ |
D | vfio_pci_intrs.c | 174 static int vfio_intx_set_signal(struct vfio_pci_device *vdev, int fd) in vfio_intx_set_signal() argument 189 if (fd < 0) /* Disable only */ in vfio_intx_set_signal() 197 trigger = eventfd_ctx_fdget(fd); in vfio_intx_set_signal() 309 int vector, int fd, bool msix) in vfio_msi_set_vector_signal() argument 328 if (fd < 0) in vfio_msi_set_vector_signal() 336 trigger = eventfd_ctx_fdget(fd); in vfio_msi_set_vector_signal() 386 int fd = fds ? fds[i] : -1; in vfio_msi_set_block() local 387 ret = vfio_msi_set_vector_signal(vdev, j, fd, msix); in vfio_msi_set_block() 438 int32_t fd = *(int32_t *)data; in vfio_pci_set_intx_unmask() local 439 if (fd >= 0) in vfio_pci_set_intx_unmask() [all …]
|
/linux-4.4.14/tools/thermal/tmon/ |
D | sysfs.c | 43 FILE *fd; in sysfs_set_ulong() local 49 fd = fopen(filepath, "w"); in sysfs_set_ulong() 50 if (!fd) { in sysfs_set_ulong() 54 ret = fprintf(fd, "%lu", val); in sysfs_set_ulong() 55 fclose(fd); in sysfs_set_ulong() 67 FILE *fd; in sysfs_get_ulong() local 73 fd = fopen(filepath, "r"); in sysfs_get_ulong() 74 if (!fd) { in sysfs_get_ulong() 78 ret = fscanf(fd, "%lu", p_ulong); in sysfs_get_ulong() 79 fclose(fd); in sysfs_get_ulong() [all …]
|
/linux-4.4.14/Documentation/misc-devices/mei/ |
D | mei-amt-version.c | 98 int fd; member 103 if (cl->fd != -1) in mei_deinit() 104 close(cl->fd); in mei_deinit() 105 cl->fd = -1; in mei_deinit() 120 me->fd = open("/dev/mei", O_RDWR); in mei_init() 121 if (me->fd == -1) { in mei_init() 130 result = ioctl(me->fd, IOCTL_MEI_CONNECT_CLIENT, &data); in mei_init() 161 rc = read(me->fd, buffer, len); in mei_recv_msg() 185 written = write(me->fd, buffer, len); in mei_send_msg() 194 FD_SET(me->fd, &set); in mei_send_msg() [all …]
|
/linux-4.4.14/tools/lib/api/fs/ |
D | fs.c | 271 int fd = open(filename, O_RDONLY), err = -1; in filename__read_int() local 273 if (fd < 0) in filename__read_int() 276 if (read(fd, line, sizeof(line)) > 0) { in filename__read_int() 281 close(fd); in filename__read_int() 288 int fd = open(filename, O_RDONLY), err = -1; in filename__read_ull() local 290 if (fd < 0) in filename__read_ull() 293 if (read(fd, line, sizeof(line)) > 0) { in filename__read_ull() 299 close(fd); in filename__read_ull()
|
/linux-4.4.14/tools/testing/selftests/powerpc/ |
D | harness.c | 127 int fd; in get_auxv_entry() local 129 fd = open("/proc/self/auxv", O_RDONLY); in get_auxv_entry() 130 if (fd == -1) { in get_auxv_entry() 137 num = read(fd, auxv, sizeof(auxv)); in get_auxv_entry() 159 close(fd); in get_auxv_entry()
|
/linux-4.4.14/tools/usb/usbip/src/ |
D | usbip_attach.c | 49 int fd; in record_connection() local 71 fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU); in record_connection() 72 if (fd < 0) in record_connection() 78 ret = write(fd, buff, strlen(buff)); in record_connection() 80 close(fd); in record_connection() 84 close(fd); in record_connection()
|