| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Broken in r334514
sysctlbyname("vfs.zfs.compressed_arc_enabled", ...) would return ENOMEM
while trying to read the sysctl (a boolean_t) into a bool, which is too small.
Reviewed by: jhb (on irc)
Sponsored by: Klara Systems
Notes:
svn path=/head/; revision=335099
|
|
|
|
|
|
|
|
|
|
|
|
| |
- remove __pure annotations I added earlier for some functions. One
writes to the the arguments as "out" pointers. The
other reads from an array, which while const within the function might
be mutated externally.
- total_change is modified to be at 1, if previously 0, so no if check
is needed.
Notes:
svn path=/head/; revision=335049
|
|
|
|
|
|
|
|
| |
- split return type from function name
- Sprinkle a __pure where possible.
Notes:
svn path=/head/; revision=335043
|
|
|
|
|
|
|
|
| |
At this point I've mucked enough with top(1) that all bugs should be
blamed on me rather than William LeFebvre.
Notes:
svn path=/head/; revision=335042
|
|
|
|
| |
Notes:
svn path=/head/; revision=335040
|
|
|
|
|
|
|
|
| |
Much of this should be inlined to the callsite, but leave it here for
now to make it easier to make it easier bisect later.
Notes:
svn path=/head/; revision=335039
|
|
|
|
|
|
|
|
| |
- Use humanize_number for format_k and format_k2
- Fix some style nits in format_time
Notes:
svn path=/head/; revision=335038
|
|
|
|
|
|
|
|
| |
For entries that are duplicates present them nicely rather than showing
two identical help entries. For ' ' present it as SPC
Notes:
svn path=/head/; revision=335037
|
|
|
|
|
|
|
|
|
|
|
| |
Continue my parade on introspection tools by fixing:
- failed to check for null after reallocf
- avoid the comma operator
- mark usage as dead
- correct size of len
Notes:
svn path=/head/; revision=335036
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- initialize all maybe uninitialized vars with bogus values. This shuts
up the compiler, and causes crashes if it changes later.
- mark noreturn as noreturn
- removed unused macro
- handle x_procstate as runtime rather than pre-processor
- avoid using void functions in condtionals
Tested with clang, gcc 7, gcc 9
Notes:
svn path=/head/; revision=335024
|
|
|
|
|
|
|
| |
CID: 1393352
Notes:
svn path=/head/; revision=335002
|
|
|
|
|
|
|
| |
CID: 1393351
Notes:
svn path=/head/; revision=335001
|
|
|
|
| |
Notes:
svn path=/head/; revision=334990
|
|
|
|
|
|
|
|
|
|
| |
- style(9)
- remove now-defunct comments
- remove getuid check for low delay
- expand range of format_k
Notes:
svn path=/head/; revision=334989
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This eliminates the difficult to follow mapping of a string list. It
moves numbers from "#define" into (more) debuggable enums. More
generally, it follows the trend of moving more data into a more central
mechanism.
The help output is a little worse: " " is not rendered well, and there
are duplicate entries, but that will be fixed in a followup.
Notes:
svn path=/head/; revision=334988
|
|
|
|
|
|
|
|
|
| |
Also update tests and the manpage.
GNU indent had the option earlier as -cs, let's not diverge unnecessarily.
Notes:
svn path=/head/; revision=334944
|
|
|
|
| |
Notes:
svn path=/head/; revision=334941
|
|
|
|
|
|
|
|
|
| |
It's clearer now when a variable represents a toggable command line option.
Many options were stored in the parser's state structure, so fix also that.
Notes:
svn path=/head/; revision=334927
|
|
|
|
|
|
|
|
| |
- attempt and fail, rather than check for permission.
- use macro rather than explicit "-20"
Notes:
svn path=/head/; revision=334922
|
|
|
|
| |
Notes:
svn path=/head/; revision=334921
|
|
|
|
|
|
|
|
| |
This enables the removal of the signal.h awk script. Shamelessly stolen
from kill(1).
Notes:
svn path=/head/; revision=334920
|
|
|
|
|
|
|
|
| |
Right now this is only used for help text but it'll eventually be used
to build up long options array, dispatch commands, etc.
Notes:
svn path=/head/; revision=334919
|
|
|
|
|
|
|
|
| |
PR: 182204
Reported by: "Brodey Dover" <doverosx@gmail.com>
Notes:
svn path=/head/; revision=334918
|
|
|
|
|
|
|
|
|
|
|
| |
- remove WARNS?=6. It is default
- we no longer have cast-qual problems
- remove unused macros
- remove unneeded casts
- add include guard for loadavg.h
Notes:
svn path=/head/; revision=334917
|
|
|
|
| |
Notes:
svn path=/head/; revision=334916
|
|
|
|
|
|
|
| |
Approved by: bcr (mentor)
Notes:
svn path=/head/; revision=334915
|
|
|
|
|
|
|
|
|
|
| |
This removes the getuid check for delay==0. It didn't prevent users from
writing similar programs in the general case. In theory, if top(1) is
among one of the few restricted programs you're allowed to run, it may
have helped a little, but there are better ways of handling that case.
Notes:
svn path=/head/; revision=334906
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had changed this from a for loop to a memset during an earlier
cleanup. This change was incorrect so revert it.
While here, clean up
Reported by: flo
Notes:
svn path=/head/; revision=334903
|
|
|
|
|
|
|
|
| |
When told to watch a specific pid, don't filter idle, system, or self
processes. The summary at the top will still flip correctly though.
Notes:
svn path=/head/; revision=334901
|
|
|
|
| |
Notes:
svn path=/head/; revision=334899
|
|
|
|
|
|
|
|
| |
The previous man page used many conventions not typical in FreeBSD.
Since we've forked top completely, convert the man page too.
Notes:
svn path=/head/; revision=334898
|
|
|
|
|
|
|
|
| |
This also documents some reserved or differing options from top's
original upstream.
Notes:
svn path=/head/; revision=334897
|
|
|
|
|
|
|
|
|
| |
original commit log by miller@OpenBSD r1.46:
Fix exit value when diffing directories with missing files and the -N
or -P options are not used. From Ibrahim Khalifa
Notes:
svn path=/head/; revision=334896
|
|
|
|
|
|
|
|
| |
Requested by: mckusick
Reviewed by: emaste
Notes:
svn path=/head/; revision=334895
|
|
|
|
|
|
|
|
|
|
| |
This keeps diffreg.c closer to what it is supposed to do:
diffing regular files.
It also allows my code to get a proper license
Notes:
svn path=/head/; revision=334894
|
|
|
|
| |
Notes:
svn path=/head/; revision=334893
|
|
|
|
|
|
|
|
|
| |
Again motivated by upcoming work to rewrite a bunch of this- single-letter
variable names and slightly misleading variable names ("lastmatches" to
indicate that the last matched) are not helpful.
Notes:
svn path=/head/; revision=334889
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
originally reported Todd C. Miller[0]
Additional data see [1][2].
While here, pet igor.
Closes #152 (github pr)
Sbmitted by: Raf Czlonka
[0]
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/cal/cal.1?rev=1.28&content-type=text/x-cvsweb-markup
[1] https://www.bell-labs.com/usr/dmr/www/1stEdman.html
[2] https://www.bell-labs.com/usr/dmr/www/man61.pdf
Notes:
svn path=/head/; revision=334873
|
|
|
|
|
|
|
|
|
|
|
| |
THR is always 6 digits or longer. Now that the PID/THR change is
separated, use correct headers.
PR: 228823
Reported by: Trond.Endrestol@ximalas.info
Notes:
svn path=/head/; revision=334869
|
|
|
|
| |
Notes:
svn path=/head/; revision=334866
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- By popular demand, implement a different switch ("T") for toggling
between thread id and process id.
- Add an assert that the size of command chars is as expected.
- Also clean up some messiness I found when implementing this.
- Further document the new flag.
Requested by: flo, ronald-lists@klop.ws, bapt
PR: 139389 (for the record)
X-MFC-With: r334474
Notes:
svn path=/head/; revision=334864
|
|
|
|
|
|
|
| |
Reported by: trasz
Notes:
svn path=/head/; revision=334837
|
|
|
|
| |
Notes:
svn path=/head/; revision=334823
|
|
|
|
|
|
|
|
|
| |
- use parens for return
- put function names on newline
- sprinkle const where possible
Notes:
svn path=/head/; revision=334822
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(or peel off the band-aid, whatever floats your boat)
This addresses two separate issues:
1.) Nothing within bsdgrep actually knew whether it cared about line numbers
or not.
2.) The file layer knew nothing about the context in which it was being
called.
#1 is only important when we're *not* processing line-by-line. #2 is
debatably a good idea; the parsing context is only handy because that's
where we store current offset information and, as of this commit, whether or
not it needs to be line-aware.
Notes:
svn path=/head/; revision=334821
|
|
|
|
|
|
|
|
|
| |
Admittedly, this is a clang-scan complaint... but it wasn't wrong. fts_flags
is initialized by all cases in the switch(), which should be fairly obvious.
Annotate this anyways.
Notes:
svn path=/head/; revision=334808
|
|
|
|
| |
Notes:
svn path=/head/; revision=334807
|
|
|
|
|
|
|
|
|
|
|
|
| |
Neither procfile nor grep_tree return anything meaningful to their callers.
None of the callers actually care about how many lines were matched in all
of the files they processed; it's all about "did anything match?"
This is generally just a light refactoring to remind me of what actually
matters as I'm rewriting these bits to care less about 'stuff'.
Notes:
svn path=/head/; revision=334806
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GNU grep as in actually in base does not have any translations support
compiled in, so no functionnality loss.
We do support 193 locales in base, we will never catch up on that number of
translation with bsd grep.
Removing NLS support make bsd grep consistent with the other binaries in base
which are not translated, and also reduce a little bit the code.
Reviewed by: kevans
Approved by: kevans
Discussed with: kevans @BSDCan
Differential Revision: https://reviews.freebsd.org/D15682
Notes:
svn path=/head/; revision=334744
|
|
|
|
|
|
|
|
| |
I am amazed at my ability to get a one-line error reporting line wrong
thrice.
Notes:
svn path=/head/; revision=334706
|