summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* If we are asked to print the total number of blocks, do so even if wedas2004-06-081-12/+14
| | | | | | | | | | | | | 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
* Remove from the printfns the assumption that dp->list != NULL. Evendas2004-06-081-2/+6
| | | | | if there are no entries, these functions may be called to print the total number of blocks (0) for consistency's sake.
* Remove a duplicated description of the test for the null string.yar2004-06-071-5/+0
| | | | MFC after: 3 days
* Describe how test(1) will evaluate its expressions for a symlink.yar2004-06-071-1/+13
| | | | | Inspired by: SUSv3 MFC after: 1 week
* Plug file descriptor leak in implementation of -n option.tjr2004-06-051-0/+1
|
* Convert fsbtoblk() from a macro to a function. The redundantdas2004-06-041-8/+13
| | | | | | | | | | 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
* Plug small memory leak.le2004-06-031-0/+1
| | | | | | PR: bin/67392 Submitted by: Matthew Emmerton <matt@gsicomp.on.ca> MFC in: 1 week
* Try to change the isdigitch() macro to something that Bruce won't rollgad2004-06-011-3/+3
| | | | | his eyes at quite so much... (actually someone else pointed this out to me a long time ago, but apparently I never fixed it)
* A few more style-fixes from Bruce. The only non-cosmetic changegad2004-06-011-16/+9
| | | | | | is to drop a call to setuid() which has not been needed for years. Noticed by: bde
* Since I'm not ready to add the non-standard ADD_PS_LISTRESET feature,gad2004-06-011-26/+1
| | | | | 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.
* Make a few style-istic improvements to the previous commits.gad2004-06-011-16/+15
| | | | Noticed by: bde
* Fix so `ps' catches and complains about null-values specified for agad2004-06-011-3/+8
| | | | | | | 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
* Additional tiny adjustment to kludge-option processing so `ps t p0'gad2004-06-011-6/+7
| | | | | | | | 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
* Rewrite the kludge-option processing to improve how it handles a fewgad2004-06-011-62/+91
| | | | | | | | | | | | | | | | | | | | 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
* Use humanize_number(3).pjd2004-05-252-60/+7
| | | | Reminded by: jhb
* Add pgrep(1) and pkill(1) to the cross-reference section of ps(1).gad2004-05-251-0/+2
|
* Use humanize_number(3) to format sizes into a human readable form.pjd2004-05-242-88/+19
|
* Include <stdio.h> for a sprintf() prototype.stefanf2004-05-241-0/+2
| | | | Approved by: das (mentor)
* Add the 'sid' info to the output of `ps -j', to make up for the 'sess'gad2004-05-232-2/+2
| | | | | | | (session-pointer) info which was dropped from `ps' earlier in 5.x. PR: bin/59423 Submitted by: Jilles Tjoelker
* Fix the kludge-old-options processing so `ps tpt' will be treated thegad2004-05-231-4/+5
| | | | | | | | same as `ps -tpt', instead of being changed into `ps -tpT'. PR: bin/52489 Submitted by: Jilles Tjoelker MFC after: 1 week
* Change `ps' to use the KERN_PROC_RGID and KERN_PROC_SESSION optionsgad2004-05-221-8/+5
| | | | | | | | (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
* Assorted markup fixes.ru2004-05-161-209/+227
|
* Punctuation.ru2004-05-161-1/+1
|
* Fixed spelling of the document date.ru2004-05-161-2/+2
|
* Bump document date for the latest functional change.ru2004-05-162-11/+12
| | | | Minor markup tweaks.
* DESCRIPTION was not updated for the new SYNOPSIS.ru2004-05-161-6/+7
|
* Added -v to usage().ru2004-05-161-1/+1
|
* Use WARNS?=3 for these in the arm case for now, due to toolchain issues.cognet2004-05-141-0/+4
|
* Only add the widths together for printable characters in prn_normal();tjr2004-05-031-1/+2
| | | | unprintable characters have a "width" of -1.
* Treat filenames as multibyte character strings (according to the currenttjr2004-05-024-65/+132
| | | | | | | | | | | | | 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.
* Various quibbles:das2004-04-281-15/+28
| | | | | | | | | - 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.
* Fix some style issues in rev 1.58.obrien2004-04-221-13/+12
| | | | | Use 64-bit integer math vs. mixed FP & integer. Add -g to the usage().
* Add 'g' to SYNOPSIS.obrien2004-04-221-1/+1
|
* Fix printing of the "Mounted on" values for 'df -i'.obrien2004-04-221-2/+4
| | | | | | Fix spacing before "Mounted on" column in general. Submitted by: bde
* Add -c option simular to du(1).obrien2004-04-183-15/+51
| | | | | PR: 19635 Submitted by: cyrille.lefevre@laposte.net
* Document the "return" built-in better: it will exit . (sources) andgreen2004-04-141-1/+7
| | | | the top-level shell instance, too.
* Style fixes and add gen to CLEANFILES.njl2004-04-091-12/+15
| | | | Submitted by: bde
* Give date(1) a much better SYNOPSIS section which is useful as more thangreen2004-04-061-9/+13
| | | | | | | 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.
* Remove clause 3 from the UCB licenses.markm2004-04-06182-728/+0
| | | | OK'ed by: imp, core
* Drop the include of <stdint.h>, since r1.84 removed references of intmax_t.gad2004-04-041-1/+0
|
* Add back the `-e' option, which was mistakenly dropped when cleaninggad2004-04-041-1/+1
| | | | | up the PS_ARGS string in revision 1.69 (and which was apparently not missed by anyone...).
* Give a name of 'l' (list) to the union in struct listinfo. This isgad2004-04-041-28/+30
| | | | | because some compilers (such as gcc 2.95.4) do not support having an unnamed union for a field in a struct.
* Stop iterating over ACLs if we've already determined webmilekic2004-04-031-5/+11
| | | | | | | | | | 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>
* Add spaces after flag names on .Fl macros.gad2004-04-011-2/+2
| | | | | Noticed by: ru MFC after: 4 days
* Describe the sorting options in better and more complete detail.gad2004-03-311-6/+29
| | | | | | Also improve the description of `-L' a little. MFC after: 4 days
* Switch to using strtoul() for parsing a potential UID or GID, which getsgad2004-03-301-9/+8
| | | | | | | this to correctly handle UID's and GID's larger than 2147483647. Noticed by: bde MFC after: 1 week
* Bruce would really like the prototype for fmt() to be split across linesgad2004-03-301-1/+2
| | | | | | | this way (although I still think it "looks weird"...). Requested by: bde MFC after: 1 week
* Minor style fixes, mostly adding indent-protection on some comment-blocks.gad2004-03-301-6/+6
| | | | | Noticed by: bde MFC after: 1 week
* Replace pscomp() with a cleaner version, mostly written by bde (*).gad2004-03-301-14/+43
| | | | | | | | | | | 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
* Oops. Remove some ';'s in #defines added by a previous update.gad2004-03-291-2/+2
| | | | Noticed by: bde
OpenPOWER on IntegriCloud