[Toybox] [New Toys] - chattr and lsattr
Rob Landley
rob at landley.net
Fri Dec 27 05:00:23 PST 2013
On 12/11/13 05:56, Ashwini Sharma wrote:
> Hi Rob, list,
>
> attached is a patch implementing __chattr__ and __lsattr__.
>
> For this, few macros are added into __e2fs.h__ and a new file lib/e2fs.c
> implementing a function, used in both chattr and lsattr, for getting the
> file
> attributes is added.
Looking at this, it needs some work.
The toys/e2fs.h is leftover from very early in toybox, and should
probably live in lib.h now. Adding a separate lib/e2fs.h _and_ adding
code to toys/e2fs.h makes no sense.
This adds linux/fs.h to another header, and I'm not comfortable with
that. I should explain why. Hmmm...
I just updated code.html to clarify that you should only include
linux/*.h headers from individual commands, not from common headers. The
new section is at:
http://landley.net/toybox/code.html#headers
Also, why #define a bunch of E2FS_SYMBOL names to the corresponding
FS_SYMBOL name? Why not just use the FS one in the C code?
I'm not merging this as-is because it's not cleanly self-contained, and
thus not something I can come back to without context and be confident
I've found all the pieces of. I'll try to make some time this weekend to
take another look at it.
Meanwhile I merged brctl and arping into pending.
Thanks,
Rob
1388149223.0
More information about the Toybox
mailing list