Age | Commit message (Collapse) | Author |
|
|
|
|
|
(Well, when you say --color or "alias ls='ls --color=auto'" in your shell.)
|
|
|
|
(And, for some reason, timezone. Individual files have timezones?)
|
|
|
|
|
|
While we're at it, ls -m wordwrap was one column early.
|
|
|
|
|
|
|
|
The recent refactoring broke ls -lh by multiplying all sizes by 0
rather than 1.
|
|
(Two spaces padding between columns, and -k is hardwired on.)
|
|
(We should use xprintf and similar to flush and check if stdout went away
once per line. No point flushing partway through a line, so in ls only use it
on things outputting a newline char.)
|
|
-h should apply to -s too. (Previously it only applied to the "total"
line in -s output.)
|
|
of number, but never NULL. Both returned in static buffer good through
next call.)
|
|
|
|
|
|
|
|
handle infinite depth. Fix docs, tweak dirtree_handle_callback() semantics,
remove dirtree_start() and don't export dirtree_handle_callback(), instead
offer dirtree_flagread(). (dirtree_read() is a wrapper around dirtree_flagread
passing 0 for flags.)
|
|
major/minor/makedev, but glibc has vowed to break existing programs
(https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html)
and replace it with _another_ non-standard header (not in posix or lsb),
so let's just add functions to lib/ that do the transform ourselves.
|
|
(because ls uses nonstandard directory recursion which collates all the
command line arguments under a fake top node, which needs more thorough
initialization).
|
|
|
|
checking, and fix up format checking complaints.
Added out(type, value) function to stat to avoid a zillion printf typecasts.
|
|
|
|
Valgrind complains that we add uninitalized memory to totals[] fields we never
read from. (If we didn't set it in entrylen() we don't use it during display,
they're testing the same flags), but valgrind doesn't understand that.
|
|
|
|
inspired by:
https://android-review.googlesource.com/#/c/152663/4/libc/bionic/fgetxattr.cpp
|
|
Also, if you mkdir "$(echo -e "one\ntwo"); chmod -r one*; ls -q one*
it honors -q.
|
|
It turns out that people are anticipating the switch to toybox ls from
toolbox ls on the assumption that this will finally bring -h support.
Let's not disappoint.
I've merged two existing buffers in listfiles whose uses didn't
overlap into one. It may be possible to cram this into toybuf with the
other stuff, but it didn't seem worth the extra complexity for 64B of
stack, especially since we were already living with that for time
formatting anyway.
|
|
Right-aligned looks pretty good to me, but it's not what anyone else does.
|
|
It's user then group, not the other way round.
|
|
|
|
|
|
|
|
|
|
it's 1999 and every path ever is from cwd or root" api versions for sockets
and as a fallback of the open fails.
There are still some holes (symlink to socket with -L will give you info
about the symlink, not the socket, and symlink to a file you can't open will
give you info about the symlink, not the file) but the correct fix is
to make O_PATH work in the kernel for the LSM functions. (If we can read
this data by path, we should be able to read it by O_PATH. We should not
need two codepaths for this.)
|
|
make lib/lsm.h auto-include from toys.h.
|
|
strwidth() got called on ->extra which was NULL. Had some other bad effects
ala "ls -sk file1 file2 file3" ignored the -k. This should fix that too.
|
|
show label: at the start (yes, even "ls -R" in an empty dir).
|
|
portability.h to new lib/lsm.h. Update ls.c to use it.
Fix "ls . toys" (two directories when one is . or ..), which was filtering
out the . as something we shouldn't recurse into even though it was explicitly
listed on the command line. For some reason "ls -Z . toys" is still segfaulting
though (but "ls -Z ." isn't), need to figure out why...
|
|
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.)
|