Lines Matching full:ls

40 	struct link_struct *ls = (struct link_struct *) priv_data;  in link_proc()  local
47 if (ls->done) in link_proc()
50 rec_len = EXT2_DIR_REC_LEN(ls->namelen); in link_proc()
52 ls->err = ext2fs_get_rec_len(ls->fs, dirent, &curr_rec_len); in link_proc()
53 if (ls->err) in link_proc()
56 if (ext2fs_has_feature_metadata_csum(ls->fs->super)) in link_proc()
67 ls->err = ext2fs_set_rec_len(ls->fs, curr_rec_len, dirent); in link_proc()
68 if (ls->err) in link_proc()
82 curr_rec_len == ls->fs->blocksize && in link_proc()
85 ls->err = ext2fs_set_rec_len(ls->fs, curr_rec_len, dirent); in link_proc()
86 if (ls->err) in link_proc()
88 t = EXT2_DIRENT_TAIL(buf, ls->fs->blocksize); in link_proc()
89 ext2fs_initialize_dirent_tail(ls->fs, t); in link_proc()
95 curr_rec_len == ls->fs->blocksize - EXT2_DIR_REC_LEN(1) && in link_proc()
99 ls->err = ext2fs_set_rec_len(ls->fs, curr_rec_len, dirent); in link_proc()
100 if (ls->err) in link_proc()
102 t = EXT2_DIRENT_TAIL(buf, ls->fs->blocksize); in link_proc()
103 ext2fs_initialize_dirent_tail(ls->fs, t); in link_proc()
117 ls->err = ext2fs_set_rec_len(ls->fs, min_rec_len, dirent); in link_proc()
118 if (ls->err) in link_proc()
125 ls->err = ext2fs_set_rec_len(ls->fs, rec_len, next); in link_proc()
126 if (ls->err) in link_proc()
137 dirent->inode = ls->inode; in link_proc()
138 ext2fs_dirent_set_name_len(dirent, ls->namelen); in link_proc()
139 strncpy(dirent->name, ls->name, ls->namelen); in link_proc()
140 if (ext2fs_has_feature_filetype(ls->sb)) in link_proc()
141 ext2fs_dirent_set_file_type(dirent, ls->flags & 0x7); in link_proc()
143 ls->done++; in link_proc()
158 struct link_struct ls; in ext2fs_link() local
166 ls.fs = fs; in ext2fs_link()
167 ls.name = name; in ext2fs_link()
168 ls.namelen = name ? strlen(name) : 0; in ext2fs_link()
169 ls.inode = ino; in ext2fs_link()
170 ls.flags = flags; in ext2fs_link()
171 ls.done = 0; in ext2fs_link()
172 ls.sb = fs->super; in ext2fs_link()
173 ls.blocksize = fs->blocksize; in ext2fs_link()
174 ls.err = 0; in ext2fs_link()
177 0, link_proc, &ls); in ext2fs_link()
180 if (ls.err) in ext2fs_link()
181 return ls.err; in ext2fs_link()
183 if (!ls.done) in ext2fs_link()