summaryrefslogtreecommitdiffstats
path: root/openbsd
Commit message (Collapse)AuthorAgeFilesLines
* Remove needless allocation error conditionsMichael McConville2016-04-291-3/+0
| | | | | These allocations were converted to use xMalloc et al. and no longer need error checks.
* Merge branch 'openbsd-mem-used' of https://github.com/juanfra684/htop into ↵Hisham Muhammad2016-03-071-10/+23
|\ | | | | | | juanfra684-openbsd-mem-used
| * Add support for cachedMem and fix usedMem on OpenBSD.Juan Francisco Cantero Hurtado2016-02-141-8/+21
| |
* | A few more OpenBSD fixesMichael McConville2016-03-051-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Namely: o use malloc where an xCalloc slipped in o safeguard against an empty arg list - I don't think it's possible, but it would be potentially exploitable o we need to initialize the arg string to an empty string because we no longer use strlcpy(3) o annotate a tricky use of strlcpy(3)'s truncation
* | Misc. OpenBSD tuneup and improvementMichael McConville2016-03-052-44/+67
|/ | | | | | | | | | | | | | | | | | | | | Including: o set *basenameEnd even in error cases (FreeBSD probably needs this) o use kvm_openfiles(3) rather than kvm_open(3) so that we can report errors (as with FreeBSD) o sanify the process argument list creation by using strlcat(3) o drop the pageSizeKb variable and use the PAGE_SIZE_KB macro directly, as the page size can't change anyway o clean up a few macros, add MINIMUM() and MAXIMUM() (should be mirrored to FreeBSD) o fix some syntax o add some useful comments
* Merge branch 'xalloc'Hisham2016-02-023-7/+7
|\
| * Check for failure in allocations.Hisham2016-02-023-7/+7
| |
* | Update generated headers.Hisham2016-02-021-1/+3
|/
* Introduce CLAMP macro. Unify all MIN(MAX(a,b),c) uses.Explorer092016-01-152-1/+9
| | | | | | | | | | | | | | | | | | | | | | | With the CLAMP macro replacing the combination of MIN and MAX, we will have at least two advantages: 1. It's more obvious semantically. 2. There are no more mixes of confusing uses like MIN(MAX(a,b),c) and MAX(MIN(a,b),c) and MIN(a,MAX(b,c)) appearing everywhere. We unify the 'clamping' with a single macro. Note that the behavior of this CLAMP macro is different from the combination `MAX(low,MIN(x,high))`. * This CLAMP macro expands to two comparisons instead of three from MAX and MIN combination. In theory, this makes the code slightly smaller, in case that (low) or (high) or both are computed at runtime, so that compilers cannot optimize them. (The third comparison will matter if (low)>(high); see below.) * CLAMP has a side effect, that if (low)>(high) it will produce weird results. Unlike MIN & MAX which will force either (low) or (high) to win. No assertion of ((low)<=(high)) is done in this macro, for now. This CLAMP macro is implemented like described in glib <http://developer.gnome.org/glib/stable/glib-Standard-Macros.html> and does not handle weird uses like CLAMP(a++, low++, high--) .
* Merge remote-tracking branch 'upstream/master' into envscreenMichael Klein2016-01-063-48/+61
|\
| * Rename variable for consistencyMichael McConville2016-01-041-16/+16
| | | | | | | | Suggested by Hisham.
| * Plug mem leak, improve CPU enumeration logicMichael McConville2016-01-031-4/+8
| | | | | | | | I think this leak may still exist in the FreeBSD port.
| * Merge pull request #331 from mmcco/fixesHisham Muhammad2016-01-032-29/+38
| |\ | | | | | | OpenBSD fixes and updates
| | * Fall back to sysctl's command name, and a bugfixMichael McConville2016-01-021-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | This is what OpenBSD's top(1) does when the libkvm call fails, and it's a good idea. This commit also fixes process name construction. The space was being written one character too far.
| | * Use dynamically allocated memory for process namesMichael McConville2016-01-021-1/+4
| | | | | | | | | | | | Even when they're constant, as is the case for zombie processes.
| | * Check for allocation failureMichael McConville2016-01-021-1/+2
| | | | | | | | | | | | Pointed out by Michael Reed.
| | * Use err() rather then errx() for sysctl()Michael McConville2016-01-021-2/+2
| | | | | | | | | | | | So that we can see errno. Pointed out by Michael Reed.
| | * OpenBSD fixes and updatesMichael McConville2016-01-022-29/+28
| | | | | | | | | | | | | | | | | | | | | I forgot how awful the process name logic was. It was an initial hack to get it running, and I forgot to clean it up. I also had to change a few includes and error function uses.
| * | Fix spelling of "maintainer"Michael McConville2016-01-021-1/+1
| |/
* / Add Platform_getProcessEnvMichael Klein2015-12-031-0/+5
|/ | | | - currently implemented for darwin and linux
* Merge pull request #299 from mmcco/masterHisham Muhammad2015-11-022-22/+21
|\ | | | | OpenBSD port updates and error exit improvements
| * Replace all err.h function uses with CRT_fatalError(). Failing withMichael McConville2015-11-011-5/+4
| | | | | | | | err.h functions corrupts the terminal when using curses.
| * Remove a debugging printMichael McConville2015-11-011-2/+1
| |
| * Remove some trailing whitespaceMichael McConville2015-10-132-14/+14
| |
| * Fix generation of openbsd/Platform.h and replace a vestigial dummy CPU ↵Michael McConville2015-10-092-1/+5
| | | | | | | | utilization value
* | Regenerate platform-dependent headers.Hisham Muhammad2015-10-192-3/+5
| | | | | | | | Closes #293.
* | let's let the user find SIGIOT if the look for it :)Hisham Muhammad2015-10-061-1/+2
|/
* Add header file reference for OpenBSD signalsMichael McConville2015-10-061-0/+3
|
* Add OpenBSD signalsMichael McConville2015-10-062-0/+44
|
* Fix enumeratoin of on-CPU processes in OpenBSDMichael McConville2015-09-191-1/+2
|
* Replace some remaining tabsMichael McConville2015-09-191-1/+1
|
* Change some tabs to three spacesMichael McConville2015-09-193-227/+228
|
* (Very) initial working OpenBSD portMichael McConville2015-09-1810-0/+962

© 2014-2024 Faster IT GmbH | imprint | privacy policy