aboutsummaryrefslogtreecommitdiff
path: root/bin/ps/fmt.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-231-2/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in main: (cherry picked from commit 1d386b48a555)
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* - Move 'showthreads' check out of fmt.c.John Baldwin2013-01-191-1/+1
| | | | | | | | - Update shadow copy of fmt_argv() prototype in w.c and fix calls for additional parameter. Notes: svn path=/head/; revision=245635
* Include the thread name along with the command name when displaying theJohn Baldwin2013-01-181-4/+9
| | | | | | | | | | | | command name of a thread from a multi-threaded process that doesn't have an available argument list (such as kernel processes) and threads display is enabled via -H. Reviewed by: alfred, delphij, eric@vangyzen.net MFC after: 1 week Notes: svn path=/head/; revision=245610
* Get rid of a cast to '(void) ' on the return of a call to strcpy.Garance A Drosehn2004-06-221-1/+1
| | | | Notes: svn path=/head/; revision=130897
* Oops. Undo that last 'const' change. It expects similar changes to someGarance A Drosehn2004-06-221-12/+10
| | | | | | | other files that I am not ready to commit yet... Notes: svn path=/head/; revision=130896
* Add 'const' to a few places.Garance A Drosehn2004-06-221-10/+12
| | | | | | | | PR: bin/65803 Submitted by: Cyrille Lefevre Notes: svn path=/head/; revision=130895
* When displaying the "COMMAND" field for system-processes and/or kernelGarance A Drosehn2004-06-221-1/+1
| | | | | | | | | | | | | threads, put the command name in square brackets instead of parenthesis. This matches NetBSD, and also seems to be what linux does. The sentence which is added to the man page is taken straight from NetBSD. PR: bin/65803 Submitted by: Cyrille Lefevre Obtained from: NetBSD Notes: svn path=/head/; revision=130894
* Remove clause 3 from the UCB licenses.Mark Murray2004-04-061-4/+0
| | | | | | | OK'ed by: imp, core Notes: svn path=/head/; revision=127958
* Fix long constant usage for i386.Mark Murray2003-05-031-1/+1
| | | | | | | Tested by: Joe Marcus Clarke <marcus@marcuscom.com> Notes: svn path=/head/; revision=114600
* Fix a bazillion warnings. This makes almost the whole of src/bin/*Mark Murray2003-05-031-1/+1
| | | | | | | | | WARNS=6, std=c99 clean. Tested on: i386, alpha Notes: svn path=/head/; revision=114583
* Display elapsed time (-o etime) using [[dd-]hh:]mm:ss, which according toPhilippe Charnier2003-02-051-0/+1
| | | | | | | | | Solaris man page is the POSIX way. Reviewed by: jmallett Notes: svn path=/head/; revision=110391
* Don't depend on pollution in <limits.h> for the definition ofMike Barcroft2002-07-051-0/+1
| | | | | | | <stdint.h> macros. Notes: svn path=/head/; revision=99457
* Consistently use FBSDIDDavid E. O'Brien2002-06-301-4/+2
| | | | Notes: svn path=/head/; revision=99110
* Back out previous back out of previously correct code.Juli Mallett2002-06-071-2/+1
| | | | | | | | Double-plus-pointy-hat to: jmallett Submitted by: bde Notes: svn path=/head/; revision=97978
* Cast arg_max to size_t when comparing it (times 4, plus 1) against SIZE_MAX. IJuli Mallett2002-06-061-1/+2
| | | | | | | | | | | was worried about truncation of arg_max by this cast, but if it gets truncated, we know it'll obviously be greater than SIZE_MAX anyway. Big pointy hat to: jmallett Submitted by: keramida Notes: svn path=/head/; revision=97959
* Returning NULL here if malloc(3) fails is silly, at this point in the codepathJuli Mallett2002-06-051-1/+1
| | | | | | | | we have't malloc(3)'d nearly as much as we probably will, so errx(3) away, instead of waiting for something to fail yet again later on. Notes: svn path=/head/; revision=97847
* Remove an XXX comment that seems to be a tiny bit no longer pertinent. ThisJuli Mallett2002-06-051-4/+0
| | | | | | | | | function seems to do the right thing, and is not a "stub", and whoever "marc" is, he's had plenty of time to do "the real one", so don't wait around for him any longer. Notes: svn path=/head/; revision=97846
* Use of zero here meant many things, NULL, '\0' (NUL), and 0. Sort it out.Juli Mallett2002-06-051-5/+5
| | | | Notes: svn path=/head/; revision=97845
* Check for possible overflow from sysconf _SC_ARG_MAX and error out in aJuli Mallett2002-05-051-5/+10
| | | | | | | | | | | | | | | | | | correct manner. Revert my incorrect change to use err(3) for malloc(3) failing. Use a size_t variable to store the size of the argument buffer we allocate, and remove silly casts as the result of having this around. Modify the math in some of the paranoid checks for buffer overflow to account for the fact we now are dealing with the actual size of the buffer. Remove the static qualifier for arg_max, and the bogus setting of it to -1. Include <limits.h> for the definitions we use to check for possible overflows. Submitted by: bde Notes: svn path=/head/; revision=96053
* Don't cast incorrectly to malloc(3), and don't use errx(3) if malloc(3)Juli Mallett2002-05-021-2/+2
| | | | | | | returns NULL, as malloc(3) sets errno. Use err(3). Notes: svn path=/head/; revision=95921
* WARNS=4 fixes (incomplete, so set NO_WERROR), and lots of extraMark Murray2002-02-031-14/+19
| | | | | | | cleanup courtesy of automatic checking (lint). Notes: svn path=/head/; revision=90143
* o __P has been reovedWarner Losh2002-02-021-10/+5
| | | | | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. Notes: svn path=/head/; revision=90110
* Prevent overflowing the buffer that stores the command arguments.Mike Heffner2002-01-201-4/+8
| | | | | | | | | PR: bin/19422 Not objected to by: -audit MFC after: 3 weeks Notes: svn path=/head/; revision=89575
* $Id$ -> $FreeBSD$Peter Wemm1999-08-271-1/+1
| | | | Notes: svn path=/head/; revision=50471
* Fixed -Wall regression (broken in rev.1.12). Removed unused includes.Bruce Evans1998-12-071-3/+3
| | | | Notes: svn path=/head/; revision=41580
* Remove compile time dependency on ARG_MAX.Joseph Koshy1998-06-171-2/+11
| | | | | | | | PR: 1791 (partial) Reviewed by: Bruce Evans <bde@freebsd.org>, Tor Egge <tegge@freebsd.org> Notes: svn path=/head/; revision=37027
* Correct use of .Nm. Add rcsid.Philippe Charnier1998-05-151-3/+5
| | | | Notes: svn path=/head/; revision=36049
* Fix buffer overflow (probably unexploitable).Guido van Rooij1997-03-101-2/+2
| | | | Notes: svn path=/head/; revision=23610
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22988
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* -Wall cleaning.Steve Price1996-12-141-2/+2
| | | | Notes: svn path=/head/; revision=20420
* Remove unneded ctype.hAndrey A. Chernov1995-10-231-2/+1
| | | | Notes: svn path=/head/; revision=11743
* Fix previous fix that removes an unnecessary space; the output is nowDavid Greenman1995-03-091-3/+6
| | | | | | | just like it was in 1.1.5. Notes: svn path=/head/; revision=6971
* Fix an error to prevent some core dumps from ps.Andreas Schulz1994-11-101-2/+3
| | | | | | | | | | | You can get ps easily to core dump, if you are running a "make depend" on a kernel in one window and a "ps -auxww" in another. The ww will try to give you the full argument list of the command that can now be 64Kb large, but ps expected only 4Kb large arg arrays and doesn't check for overflows. Notes: svn path=/head/; revision=4347
* Added $Id$David Greenman1994-09-241-0/+2
| | | | Notes: svn path=/head/; revision=3044
* Got rid of extra space between args and (command).David Greenman1994-08-181-1/+1
| | | | Notes: svn path=/head/; revision=2110
* BSD 4.4 Lite bin SourcesRodney W. Grimes1994-05-261-0/+115
Notes: svn path=/head/; revision=1556