[Toybox] [PATCH] lsattr/chattr: add missing flags.

enh enh at google.com
Tue Jan 21 17:38:38 PST 2020


the reports of the manual testing were positive, so i've sent you the
patch. i've also fixed the lsattr output -- since the tester mentioned
how broken it was -- to at least match my debian laptop's lsattr
output, which made me realize we were missing a few flags, so i fixed
that too...

i haven't tried to address the ad hoc parsing, because i've never
really understood how that's supposed to work with two commands with
non-matching flags in the same file...

On Tue, Jan 21, 2020 at 1:15 PM enh <enh at google.com> wrote:
>
> On Mon, Jan 20, 2020 at 9:23 AM Rob Landley <rob at landley.net> wrote:
> >
> > On 1/19/20 6:58 PM, enh via Toybox wrote:
> > > Also update help to include flags that were already added. Remove
> > > useless duplicative comments. Swich to FLAG macros.
> >
> > Applied, but I have a TODO item to see if I should migrate all this to FS_XFLAG
> > out of linux/fs.h, ala FS_IOC_FSGETXATTR and friends.
> >
> > (My understanding is the current stuff is ext2/3/4-specific, and the other
> > things apply to more filesystems? I think? It's still a todo for a reason. Green
> > elf needs tests cases, badly.)
>
> a grep of the kernel gets more matches for FS_IOC_SETFLAGS than for
> for FS_IOC_FSSETXATTR, and the former is available all the way back to
> 2.6 whereas the latter is new in 4.5. so i think the "applicable to
> more filesystems" thing is still mostly theoretical and the 7 year
> rule means we need FS_IOC_SETFLAGS for the foreseeable future anyway?
>
> i actually assumed your TODO was about the ad hoc argument parsing!
>
> i do need FS_IOC_FSSETXATTR though to add `-p projid`. i'll send you
> the patch for that when someone with a suitable fs tells me it
> actually works. (i've asked them if there's anything we can do about
> regression testing chattr too, though i'm assuming this needs us to
> mount a sample fs we're prepared to modify.)
>
> > Rob



More information about the Toybox mailing list