Lines Matching full:de
14 * Short name translation 1999, 2001 by Wolfram Pienkoss <wp@bszh.de>
43 struct msdos_dir_entry *de) in fat_make_i_pos() argument
46 | (de - (struct msdos_dir_entry *)bh->b_data); in fat_make_i_pos()
76 AV. OK, there we go: if both bh and de are non-NULL we assume that we just
77 AV. want the next entry (took one explicit de=NULL in vfat/namei.c).
83 struct buffer_head **bh, struct msdos_dir_entry **de) in fat__get_entry() argument
111 *de = (struct msdos_dir_entry *)((*bh)->b_data + offset); in fat__get_entry()
118 struct msdos_dir_entry **de) in fat_get_entry() argument
121 if (*bh && *de && in fat_get_entry()
122 (*de - (struct msdos_dir_entry *)(*bh)->b_data) < in fat_get_entry()
125 (*de)++; in fat_get_entry()
128 return fat__get_entry(dir, pos, bh, de); in fat_get_entry()
280 struct buffer_head **bh, struct msdos_dir_entry **de, in fat_parse_long() argument
294 ds = (struct msdos_dir_slot *)*de; in fat_parse_long()
316 if (fat_get_entry(dir, pos, bh, de) < 0) in fat_parse_long()
320 ds = (struct msdos_dir_slot *)*de; in fat_parse_long()
328 if ((*de)->name[0] == DELETED_FLAG) in fat_parse_long()
330 if ((*de)->attr == ATTR_EXT) in fat_parse_long()
332 if (IS_FREE((*de)->name) || ((*de)->attr & ATTR_VOLUME)) in fat_parse_long()
334 if (fat_checksum((*de)->name) != alias_checksum) in fat_parse_long()
343 * @de: directory entry to parse
350 const struct msdos_dir_entry *de, in fat_parse_short() argument
365 if (!isvfat && dot_hidden && (de->attr & ATTR_HIDDEN)) { in fat_parse_short()
370 memcpy(work, de->name, sizeof(work)); in fat_parse_short()
384 de->lcase & CASE_LOWER_BASE); in fat_parse_short()
420 de->lcase & CASE_LOWER_EXT); in fat_parse_short()
469 struct msdos_dir_entry *de; in fat_search_long() local
478 if (fat_get_entry(inode, &cpos, &bh, &de) == -1) in fat_search_long()
482 if (de->name[0] == DELETED_FLAG) in fat_search_long()
484 if (de->attr != ATTR_EXT && (de->attr & ATTR_VOLUME)) in fat_search_long()
486 if (de->attr != ATTR_EXT && IS_FREE(de->name)) in fat_search_long()
488 if (de->attr == ATTR_EXT) { in fat_search_long()
489 int status = fat_parse_long(inode, &cpos, &bh, &de, in fat_search_long()
507 len = fat_parse_short(sb, de, bufname, 0); in fat_search_long()
527 nr_slots++; /* include the de */ in fat_search_long()
528 sinfo->slot_off = cpos - nr_slots * sizeof(*de); in fat_search_long()
530 sinfo->de = de; in fat_search_long()
532 sinfo->i_pos = fat_make_i_pos(sb, sinfo->bh, sinfo->de); in fat_search_long()
560 struct msdos_dir_entry *de; in __fat_readdir() local
590 if (fat_get_entry(inode, &cpos, &bh, &de) == -1) in __fat_readdir()
599 if (de->name[0] == DELETED_FLAG) in __fat_readdir()
601 if (de->attr != ATTR_EXT && (de->attr & ATTR_VOLUME)) in __fat_readdir()
603 if (de->attr != ATTR_EXT && IS_FREE(de->name)) in __fat_readdir()
606 if ((de->attr & ATTR_VOLUME) || IS_FREE(de->name)) in __fat_readdir()
610 if (isvfat && de->attr == ATTR_EXT) { in __fat_readdir()
611 int status = fat_parse_long(inode, &cpos, &bh, &de, in __fat_readdir()
635 short_len = fat_parse_short(sb, de, bufname, in __fat_readdir()
650 short_len = fat_parse_short(sb, de, bufname, sbi->options.dotsOK); in __fat_readdir()
662 if (!memcmp(de->name, MSDOS_DOT, MSDOS_NAME)) { in __fat_readdir()
665 } else if (!memcmp(de->name, MSDOS_DOTDOT, MSDOS_NAME)) { in __fat_readdir()
670 loff_t i_pos = fat_make_i_pos(sb, bh, de); in __fat_readdir()
678 (de->attr & ATTR_DIR) ? DT_DIR : DT_REG)) in __fat_readdir()
871 struct msdos_dir_entry **de) in fat_get_short_entry() argument
873 while (fat_get_entry(dir, pos, bh, de) >= 0) { in fat_get_short_entry()
875 if (!IS_FREE((*de)->name) && !((*de)->attr & ATTR_VOLUME)) in fat_get_short_entry()
891 struct msdos_dir_entry **de) in fat_get_dotdot_entry() argument
895 *de = NULL; in fat_get_dotdot_entry()
896 while (fat_get_short_entry(dir, &offset, bh, de) >= 0) { in fat_get_dotdot_entry()
897 if (!strncmp((*de)->name, MSDOS_DOTDOT, MSDOS_NAME)) in fat_get_dotdot_entry()
908 struct msdos_dir_entry *de; in fat_dir_empty() local
914 while (fat_get_short_entry(dir, &cpos, &bh, &de) >= 0) { in fat_dir_empty()
915 if (strncmp(de->name, MSDOS_DOT , MSDOS_NAME) && in fat_dir_empty()
916 strncmp(de->name, MSDOS_DOTDOT, MSDOS_NAME)) { in fat_dir_empty()
933 struct msdos_dir_entry *de; in fat_subdirs() local
939 while (fat_get_short_entry(dir, &cpos, &bh, &de) >= 0) { in fat_subdirs()
940 if (de->attr & ATTR_DIR) in fat_subdirs()
959 &sinfo->de) >= 0) { in fat_scan()
960 if (!strncmp(sinfo->de->name, name, MSDOS_NAME)) { in fat_scan()
961 sinfo->slot_off -= sizeof(*sinfo->de); in fat_scan()
963 sinfo->i_pos = fat_make_i_pos(sb, sinfo->bh, sinfo->de); in fat_scan()
983 &sinfo->de) >= 0) { in fat_scan_logstart()
984 if (fat_get_start(MSDOS_SB(sb), sinfo->de) == i_logstart) { in fat_scan_logstart()
985 sinfo->slot_off -= sizeof(*sinfo->de); in fat_scan_logstart()
987 sinfo->i_pos = fat_make_i_pos(sb, sinfo->bh, sinfo->de); in fat_scan_logstart()
998 struct msdos_dir_entry *de, *endp; in __fat_remove_entries() local
1003 if (fat_get_entry(dir, &pos, &bh, &de) < 0) { in __fat_remove_entries()
1010 while (nr_slots && de < endp) { in __fat_remove_entries()
1011 de->name[0] = DELETED_FLAG; in __fat_remove_entries()
1012 de++; in __fat_remove_entries()
1022 /* pos is *next* de's position, so this does `- sizeof(de)' */ in __fat_remove_entries()
1023 pos += ((orig_slots - nr_slots) * sizeof(*de)) - sizeof(*de); in __fat_remove_entries()
1032 struct msdos_dir_entry *de; in fat_remove_entries() local
1041 de = sinfo->de; in fat_remove_entries()
1042 sinfo->de = NULL; in fat_remove_entries()
1045 while (nr_slots && de >= (struct msdos_dir_entry *)bh->b_data) { in fat_remove_entries()
1046 de->name[0] = DELETED_FLAG; in fat_remove_entries()
1047 de--; in fat_remove_entries()
1138 struct msdos_dir_entry *de; in fat_alloc_new_dir() local
1157 de = (struct msdos_dir_entry *)bhs[0]->b_data; in fat_alloc_new_dir()
1161 memcpy(de[0].name, MSDOS_DOT, MSDOS_NAME); in fat_alloc_new_dir()
1162 memcpy(de[1].name, MSDOS_DOTDOT, MSDOS_NAME); in fat_alloc_new_dir()
1163 de->attr = de[1].attr = ATTR_DIR; in fat_alloc_new_dir()
1164 de[0].lcase = de[1].lcase = 0; in fat_alloc_new_dir()
1165 de[0].time = de[1].time = time; in fat_alloc_new_dir()
1166 de[0].date = de[1].date = date; in fat_alloc_new_dir()
1169 de[0].ctime = de[1].ctime = time; in fat_alloc_new_dir()
1170 de[0].ctime_cs = de[1].ctime_cs = time_cs; in fat_alloc_new_dir()
1171 de[0].adate = de[0].cdate = de[1].adate = de[1].cdate = date; in fat_alloc_new_dir()
1173 de[0].ctime = de[1].ctime = 0; in fat_alloc_new_dir()
1174 de[0].ctime_cs = de[1].ctime_cs = 0; in fat_alloc_new_dir()
1175 de[0].adate = de[0].cdate = de[1].adate = de[1].cdate = 0; in fat_alloc_new_dir()
1177 fat_set_start(&de[0], cluster); in fat_alloc_new_dir()
1178 fat_set_start(&de[1], MSDOS_I(dir)->i_logstart); in fat_alloc_new_dir()
1179 de[0].size = de[1].size = 0; in fat_alloc_new_dir()
1180 memset(de + 2, 0, sb->s_blocksize - 2 * sizeof(*de)); in fat_alloc_new_dir()
1199 int *nr_cluster, struct msdos_dir_entry **de, in fat_add_new_entries() argument
1259 *de = (struct msdos_dir_entry *)((*bh)->b_data + offset); in fat_add_new_entries()
1260 *i_pos = fat_make_i_pos(sb, *bh, *de); in fat_add_new_entries()
1287 struct msdos_dir_entry *de; in fat_add_entries() local
1298 while (fat_get_entry(dir, &pos, &bh, &de) > -1) { in fat_add_entries()
1303 if (IS_FREE(de->name)) { in fat_add_entries()
1331 pos -= free_slots * sizeof(*de); in fat_add_entries()
1339 int size = free_slots * sizeof(*de); in fat_add_entries()
1377 &de, &bh, &i_pos); in fat_add_entries()
1396 sinfo->de = de; in fat_add_entries()
1398 sinfo->i_pos = fat_make_i_pos(sb, sinfo->bh, sinfo->de); in fat_add_entries()