Home
last modified time | relevance | path

Searched refs:dirent (Results 1 – 25 of 321) sorted by relevance

12345678910>>...13

/external/fsck_msdos/
Ddir.c528 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/e2fsprogs/lib/ext2fs/
Ddir_iterate.c28 struct ext2_dir_entry *dirent, in ext2fs_get_rec_len() argument
31 unsigned int len = dirent->rec_len; in ext2fs_get_rec_len()
44 struct ext2_dir_entry *dirent) in ext2fs_set_rec_len() argument
49 dirent->rec_len = len; in ext2fs_set_rec_len()
54 dirent->rec_len = EXT4_MAX_REC_LEN; in ext2fs_set_rec_len()
56 dirent->rec_len = 0; in ext2fs_set_rec_len()
58 dirent->rec_len = (len & 65532) | ((len >> 16) & 3); in ext2fs_set_rec_len()
74 struct ext2_dir_entry *dirent; in ext2fs_validate_entry() local
80 dirent = (struct ext2_dir_entry *)(buf + offset); in ext2fs_validate_entry()
81 if (ext2fs_get_rec_len(fs, dirent, &rec_len)) in ext2fs_validate_entry()
[all …]
Dlink.c34 static int link_proc(struct ext2_dir_entry *dirent, in link_proc() argument
52 ls->err = ext2fs_get_rec_len(ls->fs, dirent, &curr_rec_len); in link_proc()
67 ls->err = ext2fs_set_rec_len(ls->fs, curr_rec_len, dirent); in link_proc()
83 !dirent->inode) { in link_proc()
85 ls->err = ext2fs_set_rec_len(ls->fs, curr_rec_len, dirent); in link_proc()
97 dirent->name[0] == '.' && dirent->name[1] == '.') { in link_proc()
99 ls->err = ext2fs_set_rec_len(ls->fs, curr_rec_len, dirent); in link_proc()
112 if (dirent->inode) { in link_proc()
113 min_rec_len = EXT2_DIR_REC_LEN(ext2fs_dirent_name_len(dirent)); in link_proc()
117 ls->err = ext2fs_set_rec_len(ls->fs, min_rec_len, dirent); in link_proc()
[all …]
Dunlink.c34 static int unlink_proc(struct ext2_dir_entry *dirent, in unlink_proc() argument
44 ls->prev = dirent; in unlink_proc()
47 if (ext2fs_dirent_name_len(dirent) != ls->namelen) in unlink_proc()
49 if (strncmp(ls->name, dirent->name, ext2fs_dirent_name_len(dirent))) in unlink_proc()
53 if (dirent->inode != ls->inode) in unlink_proc()
56 if (!dirent->inode) in unlink_proc()
61 prev->rec_len += dirent->rec_len; in unlink_proc()
63 dirent->inode = 0; in unlink_proc()
Dcsum.c192 struct ext2_dir_entry *dirent, in __get_dx_countlimit() argument
204 rec_len = translate(dirent->rec_len); in __get_dx_countlimit()
206 if (rec_len == fs->blocksize && translate(dirent->name_len) == 0) in __get_dx_countlimit()
209 dp = (struct ext2_dir_entry *)(((char *)dirent) + rec_len); in __get_dx_countlimit()
221 c = (struct ext2_dx_countlimit *)(((char *)dirent) + count_offset); in __get_dx_countlimit()
237 struct ext2_dir_entry *dirent, in ext2fs_get_dx_countlimit() argument
241 return __get_dx_countlimit(fs, dirent, cc, offset, 0); in ext2fs_get_dx_countlimit()
254 struct ext2_dir_entry *dirent, in __get_dirent_tail() argument
265 d = dirent; in __get_dirent_tail()
266 top = EXT2_DIRENT_TAIL(dirent, fs->blocksize); in __get_dirent_tail()
[all …]
Dswapfs.c383 struct ext2_dir_entry *dirent; in ext2fs_dirent_swab_in2() local
389 dirent = (struct ext2_dir_entry *) p; in ext2fs_dirent_swab_in2()
390 dirent->inode = ext2fs_swab32(dirent->inode); in ext2fs_dirent_swab_in2()
391 dirent->rec_len = ext2fs_swab16(dirent->rec_len); in ext2fs_dirent_swab_in2()
392 dirent->name_len = ext2fs_swab16(dirent->name_len); in ext2fs_dirent_swab_in2()
393 name_len = dirent->name_len; in ext2fs_dirent_swab_in2()
395 dirent->name_len = ext2fs_swab16(dirent->name_len); in ext2fs_dirent_swab_in2()
396 retval = ext2fs_get_rec_len(fs, dirent, &rec_len); in ext2fs_dirent_swab_in2()
421 struct ext2_dir_entry *dirent; in ext2fs_dirent_swab_out2() local
426 dirent = (struct ext2_dir_entry *) p; in ext2fs_dirent_swab_out2()
[all …]
Dlookup.c32 static int lookup_proc(struct ext2_dir_entry *dirent, in lookup_proc() argument
40 if (ls->len != ext2fs_dirent_name_len(dirent)) in lookup_proc()
42 if (strncmp(ls->name, dirent->name, ext2fs_dirent_name_len(dirent))) in lookup_proc()
44 *ls->inode = dirent->inode; in lookup_proc()
/external/e2fsprogs/e2fsck/
Dpass2.c353 struct ext2_dir_entry *dirent, in check_dot() argument
362 if (!dirent->inode) in check_dot()
364 else if ((ext2fs_dirent_name_len(dirent) != 1) || in check_dot()
365 (dirent->name[0] != '.')) in check_dot()
367 else if (dirent->name[1] != '\0') in check_dot()
370 (void) ext2fs_get_rec_len(ctx->fs, dirent, &rec_len); in check_dot()
374 rec_len = dirent->rec_len = 12; in check_dot()
375 dirent->inode = ino; in check_dot()
376 ext2fs_dirent_set_name_len(dirent, 1); in check_dot()
377 ext2fs_dirent_set_file_type(dirent, EXT2_FT_UNKNOWN); in check_dot()
[all …]
Dmessage.c363 struct ext2_dir_entry *dirent; in expand_dirent_expression() local
366 if (!ctx || !ctx->dirent) in expand_dirent_expression()
369 dirent = ctx->dirent; in expand_dirent_expression()
373 fprintf(f, "%u", dirent->inode); in expand_dirent_expression()
376 len = ext2fs_dirent_name_len(dirent); in expand_dirent_expression()
377 if ((ext2fs_get_rec_len(fs, dirent, &rec_len) == 0) && in expand_dirent_expression()
380 safe_print(f, dirent->name, len); in expand_dirent_expression()
383 (void) ext2fs_get_rec_len(fs, dirent, &rec_len); in expand_dirent_expression()
387 fprintf(f, "%u", ext2fs_dirent_name_len(dirent)); in expand_dirent_expression()
390 fprintf(f, "%u", ext2fs_dirent_file_type(dirent)); in expand_dirent_expression()
[all …]
Drehash.c113 struct ext2_dir_entry *dirent; in fill_dir_block() local
130 dirent = (struct ext2_dir_entry *) dir; in fill_dir_block()
131 (void) ext2fs_set_rec_len(fs, fs->blocksize, dirent); in fill_dir_block()
149 dirent = (struct ext2_dir_entry *) (dir + dir_offset); in fill_dir_block()
150 (void) ext2fs_get_rec_len(fs, dirent, &rec_len); in fill_dir_block()
151 name_len = ext2fs_dirent_name_len(dirent); in fill_dir_block()
160 if (dirent->inode == 0) in fill_dir_block()
163 (dirent->name[0] == '.')) in fill_dir_block()
166 (dirent->name[0] == '.') && (dirent->name[1] == '.')) { in fill_dir_block()
167 fd->parent = dirent->inode; in fill_dir_block()
[all …]
/external/autotest/client/profilers/powertop/src/
Dusb.c38 struct dirent *dirent; in activate_usb_autosuspend() local
46 while ((dirent = readdir(dir))) { in activate_usb_autosuspend()
47 if (dirent->d_name[0]=='.') in activate_usb_autosuspend()
49 sprintf(filename, "/sys/bus/usb/devices/%s/power/autosuspend", dirent->d_name); in activate_usb_autosuspend()
55 sprintf(filename, "/sys/bus/usb/devices/%s/power/level", dirent->d_name); in activate_usb_autosuspend()
69 struct dirent *dirent; in suggest_usb_autosuspend() local
80 while ((dirent = readdir(dir))) { in suggest_usb_autosuspend()
81 if (dirent->d_name[0]=='.') in suggest_usb_autosuspend()
83 sprintf(filename, "/sys/bus/usb/devices/%s/power/autosuspend", dirent->d_name); in suggest_usb_autosuspend()
98 sprintf(filename, "/sys/bus/usb/devices/%s/power/level", dirent->d_name); in suggest_usb_autosuspend()
Dsata.c40 struct dirent *dirent; in activate_alpm() local
48 while ((dirent = readdir(dir))) { in activate_alpm()
49 if (dirent->d_name[0]=='.') in activate_alpm()
51 sprintf(filename, "/sys/class/scsi_host/%s/link_power_management_policy", dirent->d_name); in activate_alpm()
66 struct dirent *dirent; in suggest_sata_alpm() local
80 while ((dirent = readdir(dir))) { in suggest_sata_alpm()
81 if (dirent->d_name[0]=='.') in suggest_sata_alpm()
83 sprintf(filename, "/sys/class/scsi_host/%s/link_power_management_policy", dirent->d_name); in suggest_sata_alpm()
Dcpufreq.c38 struct dirent *dirent; in activate_ondemand() local
49 while ((dirent = readdir(dir))) { in activate_ondemand()
50 if (dirent->d_name[0]=='.') in activate_ondemand()
52 sprintf(filename, "/sys/devices/system/cpu/%s/cpufreq/scaling_governor", dirent->d_name); in activate_ondemand()
66 struct dirent *dirent; in suggest_ondemand_governor() local
82 while ((dirent = readdir(dir))) { in suggest_ondemand_governor()
83 if (dirent->d_name[0]=='.') in suggest_ondemand_governor()
85 sprintf(filename, "/sys/devices/system/cpu/%s/cpufreq/scaling_governor", dirent->d_name); in suggest_ondemand_governor()
/external/syslinux/core/fs/xfs/
Dxfs_readdir.h21 int xfs_readdir_dir2_local(struct file *file, struct dirent *dirent,
23 int xfs_readdir_dir2_block(struct file *file, struct dirent *dirent,
25 int xfs_readdir_dir2_leaf(struct file *file, struct dirent *dirent,
27 int xfs_readdir_dir2_node(struct file *file, struct dirent *dirent,
Dxfs_readdir.c32 static int fill_dirent(struct fs_info *fs, struct dirent *dirent, in fill_dirent() argument
39 dirent, offset, ino, name, namelen); in fill_dirent()
41 dirent->d_ino = ino; in fill_dirent()
42 dirent->d_off = offset; in fill_dirent()
43 dirent->d_reclen = offsetof(struct dirent, d_name) + namelen + 1; in fill_dirent()
52 dirent->d_type = DT_DIR; in fill_dirent()
54 dirent->d_type = DT_REG; in fill_dirent()
56 dirent->d_type = DT_LNK; in fill_dirent()
58 memcpy(dirent->d_name, name, namelen); in fill_dirent()
59 dirent->d_name[namelen] = '\0'; in fill_dirent()
[all …]
/external/google-breakpad/src/client/linux/minidump_writer/
Dminidump_writer.cc188 MDRawDirectory dirent; in Dump() local
190 if (!WriteThreadListStream(&dirent)) in Dump()
192 dir.CopyIndex(dir_index++, &dirent); in Dump()
194 if (!WriteMappings(&dirent)) in Dump()
196 dir.CopyIndex(dir_index++, &dirent); in Dump()
201 if (!WriteMemoryListStream(&dirent)) in Dump()
203 dir.CopyIndex(dir_index++, &dirent); in Dump()
205 if (!WriteExceptionStream(&dirent)) in Dump()
207 dir.CopyIndex(dir_index++, &dirent); in Dump()
209 if (!WriteSystemInfoStream(&dirent)) in Dump()
[all …]
/external/e2fsprogs/debugfs/
Dls.c47 static int print_filename(FILE *f, struct ext2_dir_entry *dirent, int options) in print_filename() argument
50 const char *cp = dirent->name; in print_filename()
51 int len = ext2fs_dirent_name_len(dirent); in print_filename()
86 struct ext2_dir_entry *dirent, in list_dir_proc() argument
102 struct ext2_dir_entry_tail *t = (struct ext2_dir_entry_tail *) dirent; in list_dir_proc()
104 thislen = ext2fs_dirent_name_len(dirent); in list_dir_proc()
105 ino = dirent->inode; in list_dir_proc()
126 inode.i_uid, inode.i_gid, thislen, dirent->name); in list_dir_proc()
153 ext2fs_dirent_file_type(dirent), in list_dir_proc()
161 print_filename(ls->f, dirent, options); in list_dir_proc()
[all …]
Dhtree.c38 struct ext2_dir_entry *dirent; in htree_dump_leaf_node() local
73 dirent = (struct ext2_dir_entry *) (buf + offset); in htree_dump_leaf_node()
74 errcode = ext2fs_get_rec_len(fs, dirent, &rec_len); in htree_dump_leaf_node()
81 thislen = ext2fs_dirent_name_len(dirent); in htree_dump_leaf_node()
90 strncpy(name, dirent->name, thislen); in htree_dump_leaf_node()
99 (dirent->inode == 0) && in htree_dump_leaf_node()
100 (dirent->rec_len == csum_size) && in htree_dump_leaf_node()
101 (dirent->name_len == EXT2_DIR_NAME_LEN_CSUM)) { in htree_dump_leaf_node()
104 t = (struct ext2_dir_entry_tail *) dirent; in htree_dump_leaf_node()
112 dirent->inode, hash, minor_hash, in htree_dump_leaf_node()
[all …]
Dncheck.c39 static int ncheck_proc(struct ext2_dir_entry *dirent, in ncheck_proc() argument
48 int filetype = ext2fs_dirent_file_type(dirent); in ncheck_proc()
55 if (iw->iarray[i] == dirent->inode) { in ncheck_proc()
69 ext2fs_dirent_name_len(dirent), in ncheck_proc()
70 dirent->name); in ncheck_proc()
74 ext2fs_dirent_name_len(dirent), in ncheck_proc()
75 dirent->name); in ncheck_proc()
77 if (!debugfs_read_inode(dirent->inode, &inode, in ncheck_proc()
/external/syslinux/core/fs/pxe/
Dftp_readdir.c46 int ftp_readdir(struct inode *inode, struct dirent *dirent) in ftp_readdir() argument
130 dirent->d_type = dt; in ftp_readdir()
131 dirent->d_ino = 0; /* Not applicable */ in ftp_readdir()
132 dirent->d_off = 0; /* Not applicable */ in ftp_readdir()
133 dirent->d_reclen = offsetof(struct dirent, d_name) + len+1; in ftp_readdir()
134 memcpy(dirent->d_name, name, len+1); in ftp_readdir()
Dhttp_readdir.c434 int http_readdir(struct inode *inode, struct dirent *dirent) in http_readdir() argument
463 dirent->d_ino = 0; /* Not applicable */ in http_readdir()
464 dirent->d_off = 0; /* Not applicable */ in http_readdir()
465 dirent->d_reclen = offsetof(struct dirent, d_name) + (sp-fn) + 1; in http_readdir()
466 dirent->d_type = *sp == '/' ? DT_DIR : DT_REG; in http_readdir()
467 memcpy(dirent->d_name, fn, sp-fn); in http_readdir()
468 dirent->d_name[sp-fn] = '\0'; in http_readdir()
/external/syslinux/com32/modules/
Dls.c43 static void free_dirents(struct dirent **dex, size_t n_de) in free_dirents()
55 const struct dirent *de1 = *(const struct dirent **)p_de1; in compare_dirent()
56 const struct dirent *de2 = *(const struct dirent **)p_de2; in compare_dirent()
71 struct dirent *de; in display_directory()
72 struct dirent **dex = NULL; in display_directory()
87 struct dirent *nde; in display_directory()
90 struct dirent **ndex; in display_directory()
114 maxlen -= offsetof(struct dirent, d_name) + 1; in display_directory()
Ddir.c43 static void free_dirents(struct dirent **dex, size_t n_de) in free_dirents()
55 const struct dirent *de1 = *(const struct dirent **)p_de1; in compare_dirent()
56 const struct dirent *de2 = *(const struct dirent **)p_de2; in compare_dirent()
71 struct dirent *de; in display_directory()
72 struct dirent **dex = NULL; in display_directory()
87 struct dirent *nde; in display_directory()
90 struct dirent **ndex; in display_directory()
114 maxlen -= offsetof(struct dirent, d_name) + 1; in display_directory()
/external/openssh/openbsd-compat/
Dbsd-closefrom.c35 # define NAMLEN(dirent) strlen((dirent)->d_name) argument
37 # define dirent direct macro
38 # define NAMLEN(dirent) (dirent)->d_namlen argument
74 struct dirent *dent; in closefrom()
/external/boringssl/src/decrepit/ssl/
Dssl_decrepit.c136 struct dirent *dirent = readdir(dir); in SSL_add_dir_cert_subjects_to_stack() local
137 if (dirent == NULL) { in SSL_add_dir_cert_subjects_to_stack()
148 if (strlen(path) + strlen(dirent->d_name) + 2 > sizeof(buf)) { in SSL_add_dir_cert_subjects_to_stack()
153 int r = BIO_snprintf(buf, sizeof(buf), "%s/%s", path, dirent->d_name); in SSL_add_dir_cert_subjects_to_stack()

12345678910>>...13