| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have no entries to print (either due to an empty directory or an
error). This makes the -l and -s options more consistent, like
Solaris and (Debian) Linux. To make this happen, tweak two
optimizations on the second call to display():
- Don't skip display() altogether, even if list == NULL.
- Don't skip the call to the printfn in display() if we
need to print the total.
PR: 45723
|
|
|
|
|
| |
if there are no entries, these functions may be called to print the
total number of blocks (0) for consistency's sake.
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
| |
Inspired by: SUSv3
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
instances of 64-bit arithmetic were costing 775 bytes, and the
inlining offered no benefit. Moreover, ambiguity as to the argument
types led to the introduction of a bug (see rev 1.56).
Also, remove some casts that are now clearly redundant.
Inspired by: 67467
|
|
|
|
|
|
| |
PR: bin/67392
Submitted by: Matthew Emmerton <matt@gsicomp.on.ca>
MFC in: 1 week
|
|
|
|
|
| |
his eyes at quite so much... (actually someone else pointed this out
to me a long time ago, but apparently I never fixed it)
|
|
|
|
|
|
| |
is to drop a call to setuid() which has not been needed for years.
Noticed by: bde
|
|
|
|
|
| |
remove the #ifdef for it for now. I might add the feature for real at
some later date, there isn't much reason for the #ifdef for now.
|
|
|
|
| |
Noticed by: bde
|
|
|
|
|
|
|
| |
process id, instead of using pid==0. Ie, `ps -p 12,' and `ps -p ,12'
are now errors (instead of being treated like `ps -p 0 -p 12').
Noticed by: Cyrille Lefevre on freebsd-arch
|
|
|
|
|
|
|
|
| |
is treated like `ps -t p0', instead of changing it to `ps -T p0'.
Note that `ps t' is still changed to `ps -T', since that is one of
the main reasons for this kludge processing...
Noticed by: Jilles Tjoelker on freebsd-arch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
more special situations. This is the code which process `ps blah',
when "blah" does not include a leading '-'.
This change also removes a long-undocumented BACKWARD_COMPATIBILITY
compile-time option, where:
ps -options arg1 arg2
(with no '-' on "arg1" and "arg2") was treated as:
ps -options -N arg1 -M arg2
This also changes `ps' to check for any additional arguments after
processing all the '-'-options, and attempt to use those arguments as
a pid or pidlist. If an extra argument is not a valid pidlist, then
`ps' will print an error and exit. This seems a more generally useful
extension of the kludge-option processing than the -N/-M behavior, and
has fewer confusing side-effects.
Reviewed by: freebsd-arch
|
|
|
|
| |
Reminded by: jhb
|
| |
|
| |
|
|
|
|
| |
Approved by: das (mentor)
|
|
|
|
|
|
|
| |
(session-pointer) info which was dropped from `ps' earlier in 5.x.
PR: bin/59423
Submitted by: Jilles Tjoelker
|
|
|
|
|
|
|
|
| |
same as `ps -tpt', instead of being changed into `ps -tpT'.
PR: bin/52489
Submitted by: Jilles Tjoelker
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
(if trying to match only one real-group or one session-id), now that
those options are implemented in src/sys/kern/kern_proc.c (v1.203).
PR: bin/65803 (a very tiny piece of the PR)
Submitted by: Cyrille Lefevre
|
| |
|
| |
|
| |
|
|
|
|
| |
Minor markup tweaks.
|
| |
|
| |
|
| |
|
|
|
|
| |
unprintable characters have a "width" of -1.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LC_CTYPE setting) when determining which characters are printable.
This is an often-requested feature.
Use wcwidth() to determine the number of column positions a character
takes up, although there are still a few places left where we assume
1 byte = 1 column position, e.g. line-wrapping when handling the -m option.
The error handling here is somewhat more complicated than usual: we do
our best to show what we can of a filename in the presence of conversion
errors, instead of simply aborting.
|
|
|
|
|
|
|
|
|
| |
- Print a diagnostic if kdumpenv() fails. This can occur due to MAC
restrictions or lack of memory. Catch all kenv(2) failures as well.
- Just of the heck of it, DTRT if the kernel environment size changes
at the wrong time. The old code could fail silently or fail to
null-terminate a buffer if you got exceptionally unlucky.
- Sort and GC the #includes.
|
|
|
|
|
| |
Use 64-bit integer math vs. mixed FP & integer.
Add -g to the usage().
|
| |
|
|
|
|
|
|
| |
Fix spacing before "Mounted on" column in general.
Submitted by: bde
|
|
|
|
|
| |
PR: 19635
Submitted by: cyrille.lefevre@laposte.net
|
|
|
|
| |
the top-level shell instance, too.
|
|
|
|
| |
Submitted by: bde
|
|
|
|
|
|
|
| |
decoration. Further improvements are welcome, but at least this
is a separate of the various modes of operation date has, as well as
sectioning off the two deprecated options for settimeofday(tz) that
don't even apply to actual operation of date as such, anyway.
|
|
|
|
| |
OK'ed by: imp, core
|
| |
|
|
|
|
|
| |
up the PS_ARGS string in revision 1.69 (and which was apparently not
missed by anyone...).
|
|
|
|
|
| |
because some compilers (such as gcc 2.95.4) do not support having an
unnamed union for a field in a struct.
|
|
|
|
|
|
|
|
|
|
| |
will print them (i.e., number of successful calls to acl_get_entry()
exceeds 3). This makes O(1) what was O(num_TYPE_ACCESS_ACLs).
This is a slightly modified version of submitter's patch.
PR: bin/65042
Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
|
|
|
|
|
| |
Noticed by: ru
MFC after: 4 days
|
|
|
|
|
|
| |
Also improve the description of `-L' a little.
MFC after: 4 days
|
|
|
|
|
|
|
| |
this to correctly handle UID's and GID's larger than 2147483647.
Noticed by: bde
MFC after: 1 week
|
|
|
|
|
|
|
| |
this way (although I still think it "looks weird"...).
Requested by: bde
MFC after: 1 week
|
|
|
|
|
| |
Noticed by: bde
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
This corrects a problem of lost-precision for `-r' (sort-by-CPU). Also,
for sort-by-CPU and sort-by-memory, any processes which have the same
value CPU or MEMORY are now sorted by TTY and then (if needed) by pid.
(* - I just added the NODEV checks, after doing some testing of my own)
Submitted by: bde
MFC after: 1 week
|