Lines Matching full:de
526 static void cifs_fill_dirent_posix(struct cifs_dirent *de, in cifs_fill_dirent_posix() argument
537 de->name = parsed.name; in cifs_fill_dirent_posix()
538 de->namelen = parsed.name_len; in cifs_fill_dirent_posix()
539 de->resume_key = info->Ignored; in cifs_fill_dirent_posix()
540 de->ino = le64_to_cpu(info->Inode); in cifs_fill_dirent_posix()
543 static void cifs_fill_dirent_unix(struct cifs_dirent *de, in cifs_fill_dirent_unix() argument
546 de->name = &info->FileName[0]; in cifs_fill_dirent_unix()
548 de->namelen = cifs_unicode_bytelen(de->name); in cifs_fill_dirent_unix()
550 de->namelen = strnlen(de->name, PATH_MAX); in cifs_fill_dirent_unix()
551 de->resume_key = info->ResumeKey; in cifs_fill_dirent_unix()
552 de->ino = le64_to_cpu(info->basic.UniqueId); in cifs_fill_dirent_unix()
555 static void cifs_fill_dirent_dir(struct cifs_dirent *de, in cifs_fill_dirent_dir() argument
558 de->name = &info->FileName[0]; in cifs_fill_dirent_dir()
559 de->namelen = le32_to_cpu(info->FileNameLength); in cifs_fill_dirent_dir()
560 de->resume_key = info->FileIndex; in cifs_fill_dirent_dir()
563 static void cifs_fill_dirent_full(struct cifs_dirent *de, in cifs_fill_dirent_full() argument
566 de->name = &info->FileName[0]; in cifs_fill_dirent_full()
567 de->namelen = le32_to_cpu(info->FileNameLength); in cifs_fill_dirent_full()
568 de->resume_key = info->FileIndex; in cifs_fill_dirent_full()
571 static void cifs_fill_dirent_search(struct cifs_dirent *de, in cifs_fill_dirent_search() argument
574 de->name = &info->FileName[0]; in cifs_fill_dirent_search()
575 de->namelen = le32_to_cpu(info->FileNameLength); in cifs_fill_dirent_search()
576 de->resume_key = info->FileIndex; in cifs_fill_dirent_search()
577 de->ino = le64_to_cpu(info->UniqueId); in cifs_fill_dirent_search()
580 static void cifs_fill_dirent_both(struct cifs_dirent *de, in cifs_fill_dirent_both() argument
583 de->name = &info->FileName[0]; in cifs_fill_dirent_both()
584 de->namelen = le32_to_cpu(info->FileNameLength); in cifs_fill_dirent_both()
585 de->resume_key = info->FileIndex; in cifs_fill_dirent_both()
588 static void cifs_fill_dirent_std(struct cifs_dirent *de, in cifs_fill_dirent_std() argument
591 de->name = &info->FileName[0]; in cifs_fill_dirent_std()
593 de->namelen = info->FileNameLength; in cifs_fill_dirent_std()
594 de->resume_key = info->ResumeKey; in cifs_fill_dirent_std()
597 static int cifs_fill_dirent(struct cifs_dirent *de, const void *info, in cifs_fill_dirent() argument
600 memset(de, 0, sizeof(*de)); in cifs_fill_dirent()
604 cifs_fill_dirent_posix(de, info); in cifs_fill_dirent()
607 cifs_fill_dirent_unix(de, info, is_unicode); in cifs_fill_dirent()
610 cifs_fill_dirent_dir(de, info); in cifs_fill_dirent()
613 cifs_fill_dirent_full(de, info); in cifs_fill_dirent()
616 cifs_fill_dirent_search(de, info); in cifs_fill_dirent()
619 cifs_fill_dirent_both(de, info); in cifs_fill_dirent()
622 cifs_fill_dirent_std(de, info); in cifs_fill_dirent()
635 static int cifs_entry_is_dot(struct cifs_dirent *de, bool is_unicode) in cifs_entry_is_dot() argument
639 if (!de->name) in cifs_entry_is_dot()
643 __le16 *ufilename = (__le16 *)de->name; in cifs_entry_is_dot()
644 if (de->namelen == 2) { in cifs_entry_is_dot()
648 } else if (de->namelen == 4) { in cifs_entry_is_dot()
655 if (de->namelen == 1) { in cifs_entry_is_dot()
656 if (de->name[0] == '.') in cifs_entry_is_dot()
658 } else if (de->namelen == 2) { in cifs_entry_is_dot()
659 if (de->name[0] == '.' && de->name[1] == '.') in cifs_entry_is_dot()
684 struct cifs_dirent de; in cifs_save_resume_key() local
687 rc = cifs_fill_dirent(&de, current_entry, file_info->srch_inf.info_level, in cifs_save_resume_key()
690 file_info->srch_inf.presume_name = de.name; in cifs_save_resume_key()
691 file_info->srch_inf.resume_name_len = de.namelen; in cifs_save_resume_key()
692 file_info->srch_inf.resume_key = de.resume_key; in cifs_save_resume_key()
843 struct cifs_dirent de = { NULL, }; in cifs_filldir() local
849 rc = cifs_fill_dirent(&de, find_entry, file_info->srch_inf.info_level, in cifs_filldir()
854 if (de.namelen > max_len) { in cifs_filldir()
856 de.namelen); in cifs_filldir()
861 if (cifs_entry_is_dot(&de, file_info->srch_inf.unicode)) in cifs_filldir()
871 cifs_from_utf16((char *)name.name, (__le16 *)de.name, in cifs_filldir()
873 min_t(size_t, de.namelen, in cifs_filldir()
877 name.name = de.name; in cifs_filldir()
878 name.len = de.namelen; in cifs_filldir()
909 if (de.ino && (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) { in cifs_filldir()
910 fattr.cf_uniqueid = de.ino; in cifs_filldir()