/external/e2fsprogs/lib/ext2fs/ |
D | dirblock.c | 27 struct ext2_dir_entry *dirent; in ext2fs_read_dir_block3() local 38 dirent = (struct ext2_dir_entry *) p; in ext2fs_read_dir_block3() 40 dirent->inode = ext2fs_swab32(dirent->inode); in ext2fs_read_dir_block3() 41 dirent->rec_len = ext2fs_swab16(dirent->rec_len); in ext2fs_read_dir_block3() 42 dirent->name_len = ext2fs_swab16(dirent->name_len); in ext2fs_read_dir_block3() 44 name_len = dirent->name_len; in ext2fs_read_dir_block3() 47 dirent->name_len = ext2fs_swab16(dirent->name_len); in ext2fs_read_dir_block3() 49 if ((retval = ext2fs_get_rec_len(fs, dirent, &rec_len)) != 0) in ext2fs_read_dir_block3() 82 struct ext2_dir_entry *dirent; in ext2fs_write_dir_block3() local 91 dirent = (struct ext2_dir_entry *) p; in ext2fs_write_dir_block3() [all …]
|
D | dir_iterate.c | 27 struct ext2_dir_entry *dirent, in ext2fs_get_rec_len() argument 30 unsigned int len = dirent->rec_len; in ext2fs_get_rec_len() 43 struct ext2_dir_entry *dirent) in ext2fs_set_rec_len() argument 48 dirent->rec_len = len; in ext2fs_set_rec_len() 53 dirent->rec_len = EXT4_MAX_REC_LEN; in ext2fs_set_rec_len() 55 dirent->rec_len = 0; in ext2fs_set_rec_len() 57 dirent->rec_len = (len & 65532) | ((len >> 16) & 3); in ext2fs_set_rec_len() 73 struct ext2_dir_entry *dirent; in ext2fs_validate_entry() local 79 dirent = (struct ext2_dir_entry *)(buf + offset); in ext2fs_validate_entry() 80 if (ext2fs_get_rec_len(fs, dirent, &rec_len)) in ext2fs_validate_entry() [all …]
|
D | unlink.c | 33 static int unlink_proc(struct ext2_dir_entry *dirent, in unlink_proc() argument 43 ls->prev = dirent; in unlink_proc() 46 if ((dirent->name_len & 0xFF) != ls->namelen) in unlink_proc() 48 if (strncmp(ls->name, dirent->name, dirent->name_len & 0xFF)) in unlink_proc() 52 if (dirent->inode != ls->inode) in unlink_proc() 55 if (!dirent->inode) in unlink_proc() 60 prev->rec_len += dirent->rec_len; in unlink_proc() 62 dirent->inode = 0; in unlink_proc()
|
D | link.c | 33 static int link_proc(struct ext2_dir_entry *dirent, in link_proc() argument 49 ls->err = ext2fs_get_rec_len(ls->fs, dirent, &curr_rec_len); in link_proc() 62 ls->err = ext2fs_set_rec_len(ls->fs, curr_rec_len, dirent); in link_proc() 73 if (dirent->inode) { in link_proc() 74 min_rec_len = EXT2_DIR_REC_LEN(dirent->name_len & 0xFF); in link_proc() 78 ls->err = ext2fs_set_rec_len(ls->fs, min_rec_len, dirent); in link_proc() 82 dirent->rec_len); in link_proc() 97 dirent->inode = ls->inode; in link_proc() 98 dirent->name_len = ls->namelen; in link_proc() 99 strncpy(dirent->name, ls->name, ls->namelen); in link_proc() [all …]
|
D | get_pathname.c | 43 static int get_pathname_proc(struct ext2_dir_entry *dirent, in get_pathname_proc() argument 54 if (((dirent->name_len & 0xFF) == 2) && in get_pathname_proc() 55 !strncmp(dirent->name, "..", 2)) in get_pathname_proc() 56 gp->parent = dirent->inode; in get_pathname_proc() 57 if (dirent->inode == gp->search_ino) { in get_pathname_proc() 58 retval = ext2fs_get_mem((dirent->name_len & 0xFF) + 1, in get_pathname_proc() 64 strncpy(gp->name, dirent->name, (dirent->name_len & 0xFF)); in get_pathname_proc() 65 gp->name[dirent->name_len & 0xFF] = '\0'; in get_pathname_proc()
|
D | lookup.c | 31 static int lookup_proc(struct ext2_dir_entry *dirent, in lookup_proc() argument 39 if (ls->len != (dirent->name_len & 0xFF)) in lookup_proc() 41 if (strncmp(ls->name, dirent->name, (dirent->name_len & 0xFF))) in lookup_proc() 43 *ls->inode = dirent->inode; in lookup_proc()
|
/external/e2fsprogs/e2fsck/ |
D | pass2.c | 348 struct ext2_dir_entry *dirent, in check_dot() argument 357 if (!dirent->inode) in check_dot() 359 else if (((dirent->name_len & 0xFF) != 1) || in check_dot() 360 (dirent->name[0] != '.')) in check_dot() 362 else if (dirent->name[1] != '\0') in check_dot() 365 (void) ext2fs_get_rec_len(ctx->fs, dirent, &rec_len); in check_dot() 369 rec_len = dirent->rec_len = 12; in check_dot() 370 dirent->inode = ino; in check_dot() 371 dirent->name_len = 1; in check_dot() 372 dirent->name[0] = '.'; in check_dot() [all …]
|
D | rehash.c | 89 struct ext2_dir_entry *dirent; in fill_dir_block() local 105 dirent = (struct ext2_dir_entry *) dir; in fill_dir_block() 106 (void) ext2fs_set_rec_len(fs, fs->blocksize, dirent); in fill_dir_block() 119 dirent = (struct ext2_dir_entry *) (dir + dir_offset); in fill_dir_block() 120 (void) ext2fs_get_rec_len(fs, dirent, &rec_len); in fill_dir_block() 124 (((dirent->name_len & 0xFF)+8U) > rec_len)) { in fill_dir_block() 129 if (dirent->inode == 0) in fill_dir_block() 131 if (!fd->compress && ((dirent->name_len&0xFF) == 1) && in fill_dir_block() 132 (dirent->name[0] == '.')) in fill_dir_block() 134 if (!fd->compress && ((dirent->name_len&0xFF) == 2) && in fill_dir_block() [all …]
|
D | message.c | 362 struct ext2_dir_entry *dirent; in expand_dirent_expression() local 365 if (!ctx || !ctx->dirent) in expand_dirent_expression() 368 dirent = ctx->dirent; in expand_dirent_expression() 372 fprintf(f, "%u", dirent->inode); in expand_dirent_expression() 375 len = dirent->name_len & 0xFF; in expand_dirent_expression() 376 if ((ext2fs_get_rec_len(fs, dirent, &rec_len) == 0) && in expand_dirent_expression() 379 safe_print(f, dirent->name, len); in expand_dirent_expression() 382 (void) ext2fs_get_rec_len(fs, dirent, &rec_len); in expand_dirent_expression() 386 fprintf(f, "%u", dirent->name_len & 0xFF); in expand_dirent_expression() 389 fprintf(f, "%u", dirent->name_len >> 8); in expand_dirent_expression() [all …]
|
/external/fsck_msdos/ |
D | dir.c | 528 struct dosDirEntry dirent, *d; in readDosDirSection() local 691 memset(&dirent, 0, sizeof dirent); in readDosDirSection() 697 dirent.flags = p[11]; in readDosDirSection() 703 dirent.name[j] = p[j]; in readDosDirSection() 704 dirent.name[8] = '\0'; in readDosDirSection() 705 for (k = 7; k >= 0 && dirent.name[k] == ' '; k--) in readDosDirSection() 706 dirent.name[k] = '\0'; in readDosDirSection() 707 if (dirent.name[k] != '\0') in readDosDirSection() 709 if (dirent.name[0] == SLOT_E5) in readDosDirSection() 710 dirent.name[0] = 0xe5; in readDosDirSection() [all …]
|
/external/chromium_org/native_client_sdk/src/libraries/nacl_io/ |
D | getdents_helper.cc | 44 dirents_.push_back(dirent()); in AddDirent() 45 dirent& entry = dirents_.back(); in AddDirent() 47 entry.d_off = sizeof(dirent); in AddDirent() 48 entry.d_reclen = sizeof(dirent); in AddDirent() 53 size_t d_name_max = MEMBER_SIZE(dirent, d_name) - 1; // -1 for \0. in AddDirent() 60 dirent* pdir, in GetDents() 70 if (size < sizeof(dirent)) in GetDents() 74 size -= size % sizeof(dirent); in GetDents() 76 size_t max = dirents_.size() * sizeof(dirent); in GetDents()
|
/external/qemu/util/ |
D | path.c | 62 # define dirent_type(dirent) ((dirent)->d_type) argument 66 # define dirent_type(dirent) (1) argument 75 struct dirent *dirent; in add_dir_maybe() local 77 while ((dirent = readdir(dir)) != NULL) { in add_dir_maybe() 78 if (!streq(dirent->d_name,".") && !streq(dirent->d_name,"..")){ in add_dir_maybe() 79 path = add_entry(path, dirent->d_name, dirent_type(dirent)); in add_dir_maybe()
|
/external/e2fsprogs/debugfs/ |
D | ncheck.c | 38 static int ncheck_proc(struct ext2_dir_entry *dirent, in ncheck_proc() argument 47 int filetype = dirent->name_len >> 8; in ncheck_proc() 54 if (iw->iarray[i] == dirent->inode) { in ncheck_proc() 68 (dirent->name_len & 0xFF), dirent->name); in ncheck_proc() 72 (dirent->name_len & 0xFF), dirent->name); in ncheck_proc() 74 if (!debugfs_read_inode(dirent->inode, &inode, in ncheck_proc()
|
D | htree.c | 37 struct ext2_dir_entry *dirent; in htree_dump_leaf_node() local 68 dirent = (struct ext2_dir_entry *) (buf + offset); in htree_dump_leaf_node() 69 errcode = ext2fs_get_rec_len(fs, dirent, &rec_len); in htree_dump_leaf_node() 79 ((((unsigned) dirent->name_len & 0xFF)+8) > rec_len)) { in htree_dump_leaf_node() 84 thislen = dirent->name_len & 0xFF; in htree_dump_leaf_node() 85 strncpy(name, dirent->name, thislen); in htree_dump_leaf_node() 94 dirent->inode, hash, minor_hash, rec_len, name); in htree_dump_leaf_node() 368 struct ext2_dir_entry *dirent; in search_dir_block() local 386 dirent = (struct ext2_dir_entry *) (p->buf + offset); in search_dir_block() 387 errcode = ext2fs_get_rec_len(fs, dirent, &rec_len); in search_dir_block() [all …]
|
D | ls.c | 46 struct ext2_dir_entry *dirent, in list_dir_proc() argument 63 thislen = dirent->name_len & 0xFF; in list_dir_proc() 64 strncpy(name, dirent->name, thislen); in list_dir_proc() 66 ino = dirent->inode; in list_dir_proc() 102 inode.i_mode, dirent->name_len >> 8, in list_dir_proc() 110 sprintf(tmp, "%c%u%c (%d) %s ", lbr, dirent->inode, rbr, in list_dir_proc() 111 dirent->rec_len, name); in list_dir_proc()
|
/external/oprofile/daemon/ |
D | opd_stats.c | 41 struct dirent * dirent; in opd_print_stats() local 68 while ((dirent = readdir(dir))) { in opd_print_stats() 71 if (sscanf(dirent->d_name, "cpu%d", &cpu_nr) != 1) in opd_print_stats() 73 snprintf(path, 256, "/dev/oprofile/stats/%s", dirent->d_name); in opd_print_stats()
|
/external/compiler-rt/test/asan/TestCases/Linux/ |
D | interception_readdir_r_test.cc | 26 struct dirent *result = (struct dirent *)(0xfeedbeef); in main() 33 ((struct dirent *)entry_buffer)->d_reclen = 9999; in main() 34 if (readdir_r(d, (struct dirent *)entry_buffer, &result) != 0) in main()
|
/external/e2fsprogs/lib/e2p/ |
D | iod.c | 27 int (*func) (const char *, struct dirent *, void *), in iterate_on_dir() argument 31 struct dirent *de, *dep; in iterate_on_dir() 48 max_len += sizeof(struct dirent); in iterate_on_dir() 66 len = sizeof(struct dirent); in iterate_on_dir()
|
/external/chromium_org/base/files/ |
D | dir_reader_linux.h | 52 linux_dirent* dirent = reinterpret_cast<linux_dirent*>(&buf_[offset_]); in Next() local 53 offset_ += dirent->d_reclen; in Next() 75 const linux_dirent* dirent = in name() local 77 return dirent->d_name; in name()
|
/external/chromium_org/native_client_sdk/src/libraries/nacl_io/jsfs/ |
D | js_fs_node.cc | 294 struct dirent* pdir, in GetDents() 302 size_t first = offs / sizeof(dirent); in GetDents() 303 size_t last = (offs + count + sizeof(dirent) - 1) / sizeof(dirent); in GetDents() 336 uint32_t dirents_byte_len = dirents_len * sizeof(dirent); in GetDents() 340 dirent* dirents = static_cast<dirent*>(malloc(dirents_byte_len)); in GetDents() 361 dirents[i].d_off = sizeof(dirent); in GetDents() 362 dirents[i].d_reclen = sizeof(dirent); in GetDents() 366 size_t dirents_offs = offs - first * sizeof(dirent); in GetDents()
|
/external/compiler-rt/test/msan/ |
D | scandir.cc | 20 static int my_filter(const struct dirent *a) { in my_filter() 29 static int my_compar(const struct dirent **a, const struct dirent **b) { in my_compar() 44 struct dirent **d; in main()
|
/external/linux-tools-perf/perf-3.12.0/tools/perf/util/ |
D | thread_map.c | 14 static int filter(const struct dirent *dir) in filter() 27 struct dirent **namelist = NULL; in thread_map__new_by_pid() 66 struct dirent dirent, *next, **namelist = NULL; in thread_map__new_by_uid() local 78 while (!readdir_r(proc, &dirent, &next) && next) { in thread_map__new_by_uid() 82 pid_t pid = strtol(dirent.d_name, &end, 10); in thread_map__new_by_uid() 87 snprintf(path, sizeof(path), "/proc/%s", dirent.d_name); in thread_map__new_by_uid() 162 struct dirent **namelist = NULL; in thread_map__new_by_pid_str()
|
/external/bluetooth/bluedroid/btif/co/ |
D | bta_fs_co.c | 62 struct dirent *de; in del_path() 863 struct dirent *dirent; in bta_fs_co_getdirentry() local 885 if((dirent = readdir(dir)) != NULL) in bta_fs_co_getdirentry() 889 BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dirent = %p", dirent); in bta_fs_co_getdirentry() 893 BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dirent = %p", dirent); in bta_fs_co_getdirentry() 901 if ((dirent = readdir((DIR*)p_entry->refdata)) == NULL) in bta_fs_co_getdirentry() 906 BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dirent = %p", dirent); in bta_fs_co_getdirentry() 910 BTIF_TRACE_DEBUG("bta_fs_co_getdirentry: dirent = %p", dirent); in bta_fs_co_getdirentry() 919 sprintf(fullname, "%s/%s", p_path, dirent->d_name); in bta_fs_co_getdirentry() 931 strcpy(p_entry->p_name, dirent->d_name); in bta_fs_co_getdirentry() [all …]
|
/external/oprofile/gui/ |
D | oprof_start_util.cpp | 65 struct dirent * dirent; in daemon_status() local 72 while ((dirent = readdir(dir))) { in daemon_status() 75 + dirent->d_name + "/exe"); in daemon_status() 80 daemon_pid = dirent->d_name; in daemon_status()
|
/external/oprofile/opcontrol/ |
D | opcontrol.cpp | 493 for (struct dirent* dirent; !!(dirent = readdir(dir));) { in do_status() local 494 if (strlen(dirent->d_name) >= 4 && memcmp(dirent->d_name, "cpu", 3) == 0) { in do_status() 497 strcat(cpupath, dirent->d_name); in do_status() 502 printf(" %s %9u samples received\n", dirent->d_name, num); in do_status() 507 printf(" %s %9u samples lost overflow\n", dirent->d_name, num); in do_status() 512 printf(" %s %9u samples invalid eip\n", dirent->d_name, num); in do_status() 517 printf(" %s %9u backtrace aborted\n", dirent->d_name, num); in do_status()
|