summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Have this source explicitly include <sys/proc.h>, since it referencesgad2004-03-291-0/+1
| | | | | | | values such as P_CONTROLT and PS_INMEM. But this still won't define PID_MAX for us, since that is hidden inside of '#ifdef _KERNEL'. Noticed by: bde
* Since "kp" is a pointer, I should be comparing against NULL not 0.gad2004-03-291-1/+1
| | | | Noticed by: bde
* Various style improvements, mostly in comments and indentation.gad2004-03-291-43/+58
| | | | Suggested by: bde (well, for most of them)
* In the routines I've been working on, sort the variable declartionsgad2004-03-291-9/+9
| | | | | | so that non-pointers are listed after pointer-type variables. Noticed by: bde
* Split two 'fmt' strings so they're easier to read on 80-char windows.gad2004-03-291-2/+4
|
* Sort the declarations of global variables.gad2004-03-291-24/+25
|
* Sort the routine prototypes.gad2004-03-281-10/+9
|
* If <x> is a process id that does not exist, then just print the headergad2004-03-281-1/+1
| | | | | | | (if any) and exit, thus matching the behavior on -stable and other OS's. My earlier attempt to fix this (v1.65) only seemed to work because of a lucky random value in nentries (which was not being initialized back when I tested that earlier patch).
* Fix `-o rtprio' so it prints the correct value.gad2004-03-281-2/+2
| | | | | | PR: bin/59417 Submitted by: Jan Willem Knopper This fix by: bde (in the audit-trail of the PR)
* If a non-existent user is given as part of `-U userlist', treat it asgad2004-03-271-11/+6
| | | | | a fatal error instead of a minor warning. It is possible that a few users are used to the previous behavior, but I'm claiming it was a bug.
* Explicitly wrap two long-ish linesi of code, to make them easier to read.gad2004-03-271-2/+4
|
* Change the #if-ish logic which is used to add the `-f' option when `ps'gad2004-03-271-9/+9
| | | | | | is compiled with LAZY_PS, so that there is only one PS_ARGS string to modify when changing the option-list. Also get `-f' to show up in the usage() statement when compiled with LAZY_PS.
* Move the 'f' case so it shows up in the right place, alphabetically.gad2004-03-271-6/+6
|
* Update the date on the man page, since this the previous change addedgad2004-03-271-1/+1
| | | | a few new options.
* Support more POSIX/SUSv3 options:gad2004-03-272-187/+580
| | | | | | | | | | | | | | | | | | | | | | - Change `-p' to allow a list of process IDs, and `-t' to allow a list of terminal names, instead of only a single value for each. - Add the `-A' option of SUSv3, which is exactly the same as `-ax'. - Add the `-G gidlist' (group id). - Allow any of these "selector options" to be specified multiple times, and have `ps' keep adding to a given list -- instead of replacing the previously-specified values. - Fix interactions between selector-options, so that: "If any are specified, ... ps shall select the processes represented by the inclusive OR of all the selection-criteria options." (from SUSv3) - Add a `-X' option, which is the reverse of the `-x' option. - various minor improvements in parsing and error handling. This does not get us to match POSIX/SUSv3, but it gets us closer. The `-g pgidlist', `-R ruserlist' and `-s sidlist' options mentioned in freebsd-standards are still under debate, so they skipped for now. It should be true that this introduces no user-visible incompatible changes, except to support "new stuff" that was not supported before.
* Avoid the manpage layering violation and low-level implementationru2004-03-261-3/+2
| | | | | details of libkvm, and just tell what the getbootfile(3) function will return, by using the text from netstat(1) and dmesg(8).
* - Remove references to /dev/kmem -- ps(1) utilizes theru2004-03-261-11/+5
| | | | | | | sysctl(3) interface in kvm(3). - Document the correct default when no -N is specified. - Remove stale reference to /var/db/kvm_kernel.db. - Remove stale reference to /var/run/dev.db.
* Remove WFORMAT, style.Makefile(5).obrien2004-03-221-5/+5
|
* When symbolic link is pointed onto a mount point, it can't be movedpjd2004-03-211-6/+17
| | | | | | | | | to a different file system. Patch in PR was incorrect. PR: bin/64430 Submitted by: Samuel Tardieu MFC after: 3 days
* Document incorrect handling of multibyte characters.tjr2004-03-211-1/+6
|
* Document incorrect handling of multibyte characters in filenames.tjr2004-03-211-1/+5
|
* Reduce redundancy in the description of the -u option.tjr2004-03-211-3/+1
|
* Document incorrect handling of multibyte characters when -t and -v optionstjr2004-03-211-1/+9
| | | | are used.
* Add a -v (verbose) option.des2004-03-212-13/+26
|
* Install /bin/sh safely. This allows a shell script to be usedru2004-03-181-0/+1
| | | | | | | to strip binaries by specifying it in the STRIPBIN environment variable honoured by install(1). MFC after: 3 days
* Fix 'ps -p proclist' and 'ps -u userlist' so the command returns non-zerogad2004-03-181-3/+13
| | | | | | | | if no processes were matched. Also sorts the list of 'int's in main, as long as I had to add another one... Noticed by: Nate Lawson MFC after: 10 days
* Improvements to 'ps -p <x>'. If <x> is a process id that does not exist, thengad2004-03-172-21/+104
| | | | | | | | | | | just print the header (if any) and exit, thus matching the behavior on -stable and other OS's. Also adds support for <x> being a comma-separated list of processes, and does a much better checking for invalid-values of <x>, such as 'ps -p someword'. Reviewed by: mentioned on freebsd-current MFC after: 10 days
* Fix memory leakcperciva2004-03-161-2/+2
| | | | | | | PR: bin/64321 Submitted by: Rodney Ruddock <rodney@interopsystems.com> MFOpenBSD: rev 1.17 MFC after: 3 days
* static and const.jmallett2004-03-151-10/+10
|
* And a bandaid so that the output of "available space" is correct whenle2004-03-091-1/+2
| | | | | | | | | | using -m and -g switches and "available space" is negative (i.e. when the file system is already using the root-reserved minimum free space). Obtained from: Stefan Farfeleder <stefan@fafoe.narf.at> PR: bin/62536 Submitted by: Peter van Dijk <peter@dataloss.nl> Approved by: grog (mentor), bde
* Remove a.out at the end of 'make test'ache2004-03-081-1/+1
|
* Fixed some style bugs (mainly unsorting and tab lossage in previous commit).bde2004-03-061-16/+15
|
* Add a.out to CLEANFILESache2004-03-061-0/+1
|
* Change locale name from non-existent ASCII to en_US.US-ASCIIache2004-03-061-2/+2
|
* Teach dd(1) about parity bits.phk2004-03-059-21/+157
|
* Add a test-target and reference vectors for the character converions.phk2004-03-0511-0/+194
|
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-052-2/+2
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* Rev. 1.32 moved a comment to the wrong line. The hack refered tomtm2004-03-041-2/+2
| | | | | | | | | | in the comment applies to a decision that needs to be made in relation to the year 2000. In fact, that statement probably should be changed to be more generic (getting the year from the current time perhaps). Otherwise, starting in 2069 two digit year conversions in date(1) will start assuming 1900 instead of 2000. hehe.
* Fixes to output of `ls -lh` for certain file sizes:cperciva2004-03-011-4/+4
| | | | | | | | | | | | | | | | | | | | | 1. Sizes in the range 1000 -- 1023 units require four characters width for the integer; increase the field width to accomodate this. 2. Sizes in the range 9.95 -- 10 units were being displayed as "10.0" units; adjust the logic to fix this, and now that we've got an extra character of field width, print fractional units if the size is less than 99.95 units. 3. Don't display sub-byte precision. This should mean that the following sizes are displayed: 0B .. 1023B 1.0U .. 9.9U 10.0U .. 99.9U 100U .. 1023U for values of U in "KMGTPE". PR: bin/63547 Pointy hat to: cperciva Approved by: rwatson (mentor)
OpenPOWER on IntegriCloud