Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Includes tests for the new feature, and a failure case for the minimal
perms test as well.
Also some typo fixing / massaging the help text so it fits in 80
columns.
|
|
|
|
move slot[] documentation into C code, add PR %VSZ VIRT RES SHR
|
|
Even though ext2 has a comment that it has to be at the start, I added swap
to the start of the array (oops). The test suite was also wrong (it was
matching the _incorrect_ output).
|
|
|
|
|
|
|
|
instead of carving up toybuf by hand. This makes breaking out the field
conversion logic into its own function less expensive.
|
|
Change readfileat() to pass back length of read.
|
|
1) It read st_dev instead of st_mode.
2) It reversed the semantics of absolute vs minimal ('-' prefixed) tests.
Add tests for these, and move the "unterminated -exec" test into the "Still
fails" section because it's still dumping core for me.
|
|
|
|
Four-digit years were being mangled by the code for two-digit years.
Move all the two-digit year code into the "we only saw two digits" case.
Add some new tests and fix existing tests.
|
|
functions to read major()/minor(), fix printf format warnings in error msg.
|
|
|
|
|
|
Both Android and GNU interpret -n to mean "show numeric users and groups",
despite what POSIX says.
|
|
This is equivalent to Android's historical "NAME" column, showing the
first element of /proc/pid/cmdline.
|
|
|
|
|
|
ticks _is_ 100...
|
|
|
|
Collate some repeated increments, remove some useless coments.
|
|
|
|
|
|
|
|
|
|
|
|
(The help infrastructure can collate and alphebetize short options,
long options haven't got a standardized help text format. Not a hard
requirement to have a short opt, but it's nice.)
|
|
"comm" is the command name without arguments, and "cmd" the command
line including arguments. Confusingly, "command" is a synonym for
the *latter*, not the former.
This implementation of "comm" matches the GNU ps behavior where the
names are truncated, but Android historically used the full name
from /proc/pid/cmdline instead, so this patch isn't sufficient to
let us match the Android behavior.
|
|
I actually thought ps was segfaulting, and it wasn't until I was in gdb
that I even noticed there was an error message at all, and even then I
had to read the source to work out what it was trying to tell me.
Before:
$ ps -o user,pid,ppid,vsize,rss,nice,wchan,addr,unknown,stat,cmd
ps: -o 'user,pid,ppid,vsize,rss,nice,wchan,addr,unknown,stat,cmd'@41
USER PID PPID VSZ RSS NI WCHAN ADDR$
After:
$ ps -o user,pid,ppid,vsize,rss,nice,wchan,addr,unknown,stat,cmd
ps: bad -o field 'user,pid,ppid,vsize,rss,nice,wchan,addr,unknown,stat,cmd'
^
|
|
As with ls, it doesn't seem like -Z should be guarded behind LSM
availability. On a non-SELinux system, the label is always "unconfined".
|
|
Used by Android.
|
|
(Matches beginning and EOF at once.)
|
|
|
|
This lets '(x)\1' match, as reported by Isabella Parakiss.
|
|
an extra newline because the test for whether we have an existing string to
append a newline to was checking if struct step had data appended to it,
and the /x/ regex is data appended to it. Change test to check for null
terminator at ->arg1 offset.
|
|
|
|
Tempted to convert the struct arg_list and ptr_len stuff to arrays and
make the parsing table driven, but there's enough direct usages of each
field it's not a net win.
|
|
and vmlck into slot[18], pass error message to comma_args(), collate -stuUgG
callbacks into parse_rest().
|
|
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.
|
|
the global so "install -g 0" doesn't alias to "cp --preserve 0" and error out.
through to --preserve 0"
|
|
|
|
|
|
Fix FLAG_w.
|
|
rather than bitfields.
|
|
Fix more l/r justification, implement uname vsz vsize and stat.
|