Lines Matching refs:root
142 static int retell_dir(struct dirtree *root)
146 if (root->again) {
150 if (S_ISDIR(root->st.st_mode) && !root->parent)
153 fpath = dirtree_path(root, NULL);
155 if ((root->name[0] != '.') || (toys.optflags & FLAG_a)) {
157 if (S_ISDIR(root->st.st_mode) && (toys.optflags & FLAG_R)
158 && dirtree_notdotdot(root)) {
252 static int update_attr(struct dirtree *root)
258 if (!dirtree_notdotdot(root)) return 0;
264 if ((S_ISLNK(root->st.st_mode) && chattr.recursive)
265 || (!S_ISREG(root->st.st_mode) && !S_ISLNK(root->st.st_mode)
266 && !S_ISDIR(root->st.st_mode)))
269 fpath = dirtree_path(root, NULL);
275 if (ext2_getflag(fd, &(root->st), &fval) < 0) {
282 if (ext2_setflag(fd, &(root->st), chattr.set) < 0)
287 if (!S_ISDIR(root->st.st_mode)) fval &= ~FS_DIRSYNC_FL;
288 if (ext2_setflag(fd, &(root->st), fval) < 0)
297 return (S_ISDIR(root->st.st_mode) && chattr.recursive) ? DIRTREE_RECURSE : 0;