Age | Commit message (Collapse) | Author |
|
and some cleanups while I was there.
|
|
symfollow true/false.)
|
|
under traversal. Pass through full flag set in dirtree_add_node(), add
dirtree_start() wrapper to provide symlink-only behavior (avoiding a lot
of DIRTREE_SYMFOLLOW*!!(logic) repeated in callers).
|
|
This patch uses lgetfilecon rather than fgetfilecon because
dirtree_parentfd always seems to return -1 in this function. If/when
the SMACK code is fixed to work with dirtree_parentfd, I'll send a
matching patch for SELinux.
In the meantime, this works, and although ls -h is still on my to-do
list, I think this patch is sufficient to let us replace toolbox ls
with toybox ls.
|
|
Behavior change in flags: allow -long to work together, and -l1 work like -l
not -1.
I didn't make ls -gCl remember the g, though. (Because -Cg and -gC take
the last one: I'll preserve explicit state but not implicit state. And if
-1Cl and -lC1 aren't going to behave the same, it wasn't consistent anyway.)
|
|
|
|
Option triggers printing security context,
for smack that is file's access smack label.
Change-Id: I9054d9bcfe4d149e8fbfa0831b6ab50165d2bd91
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
|
|
|
|
(Don't specify the space flag when it's the default behavior. The ifconfig
stuff was actual bugs.)
|
|
symlink following.
|
|
without -H or -L (just like ls -l).
|
|
DIRTREE_SYMFOLLOW value, not just true/false).
|
|
|
|
Use wcwidth() instead of strlen(), and extend the -q substitution to also
whiteout nonprintable characters that are nonparseable utf8 snippets.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib: rename format_mode() to mode_to_string() (echoing string_to_mode), make it
take a normal char * argument.
stat: collapse big switch/case statements that only have one line each
into if/else staircase (much fewer lines of code). Remove return type
(other stat implementations print ? for unknown escapes, so do that here).
Inline do_stat() and do_statfs(). Set default string in normal local
variable "format". Remove unnecessary struct d. Restructure stat logic to
"if (flagf && !statfs()) else if (!flagf && !stat()) else perror_msg();"
Teach %N to add -> symlink. Judicious use of putchar() instead of xputc to
let FILE * do its job collating output.
|
|
|
|
division by zero error.
|
|
|
|
|
|
|
|
|
|
|
|
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style.
The actual code should be the same afterward, this is just cosmetic refactoring.
|
|
FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
|
|
|
|
|
|
|