Lines Matching refs:chattr
187 } chattr; variable
218 chattr.recursive = 1; in parse_cmdline_arg()
227 chattr.version = strtoul(arg, &endptr, 0); in parse_cmdline_arg()
229 chattr.vflag = 1; in parse_cmdline_arg()
231 } else chattr.rm |= get_flag_val(*ptr); in parse_cmdline_arg()
236 chattr.add |= get_flag_val(*ptr); in parse_cmdline_arg()
240 chattr.set |= get_flag_val(*ptr); in parse_cmdline_arg()
261 if ((S_ISLNK(root->st.st_mode) && chattr.recursive) in update_attr()
278 if (chattr.set) { // for '=' operator. in update_attr()
279 if (ext2_setflag(fd, &(root->st), chattr.set) < 0) in update_attr()
282 fval &= ~(chattr.rm); in update_attr()
283 fval |= chattr.add; in update_attr()
288 if (chattr.vflag) { // set file version in update_attr()
289 if (ioctl(fd, FS_IOC_SETVERSION, (void*)&chattr.version) < 0) in update_attr()
295 if (S_ISDIR(root->st.st_mode) && chattr.recursive) return DIRTREE_RECURSE; in update_attr()
303 memset(&chattr, 0, sizeof(struct _chattr)); in chattr_main()
306 if (chattr.set && (chattr.add || chattr.rm)) in chattr_main()
308 if (chattr.rm & chattr.add) error_exit("set/unset same flag"); in chattr_main()
309 if (!(chattr.add || chattr.rm || chattr.set || chattr.vflag)) in chattr_main()