Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
ae5c01f4
Commit
ae5c01f4
authored
9 years ago
by
Michael McConville
Browse files
Options
Download
Email Patches
Plain Diff
Use err() rather then errx() for sysctl()
So that we can see errno. Pointed out by Michael Reed.
parent
22cfda63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbsd/OpenBSDProcessList.c
+2
-2
openbsd/OpenBSDProcessList.c
with
2 additions
and
2 deletions
+2
-2
openbsd/OpenBSDProcessList.c
View file @
ae5c01f4
...
...
@@ -60,7 +60,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
size
=
sizeof
(
fscale
);
if
(
sysctl
(
fmib
,
2
,
&
fscale
,
&
size
,
NULL
,
0
)
<
0
)
err
x
(
1
,
"fscale sysctl call failed"
);
err
(
1
,
"fscale sysctl call failed"
);
for
(
i
=
0
;
i
<
pl
->
cpuCount
;
i
++
)
{
fpl
->
cpus
[
i
].
totalTime
=
1
;
...
...
@@ -90,7 +90,7 @@ static inline void OpenBSDProcessList_scanMemoryInfo(ProcessList* pl) {
size_t
size
=
sizeof
(
uvmexp
);
if
(
sysctl
(
uvmexp_mib
,
2
,
&
uvmexp
,
&
size
,
NULL
,
0
)
<
0
)
{
err
x
(
1
,
"uvmexp sysctl call failed"
);
err
(
1
,
"uvmexp sysctl call failed"
);
}
//kb_pagesize = uvmexp.pagesize / 1024;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help