Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Update LICENSE for Tobias
[slstatus.git]
/
components
/
load_avg.c
diff --git
a/components/load_avg.c
b/components/load_avg.c
index
d6f6bd4
..
5c2e252
100644
(file)
--- a/
components/load_avg.c
+++ b/
components/load_avg.c
@@
-1,18
+1,18
@@
/* See LICENSE file for copyright and license details. */
/* See LICENSE file for copyright and license details. */
-#include <
err
.h>
+#include <
stdio
.h>
#include <stdlib.h>
#include "../util.h"
const char *
#include <stdlib.h>
#include "../util.h"
const char *
-load_avg(
const char *fmt
)
+load_avg(
void
)
{
double avgs[3];
if (getloadavg(avgs, 3) < 0) {
{
double avgs[3];
if (getloadavg(avgs, 3) < 0) {
- warn
x("Failed to get the load avg
");
+ warn
("getloadavg: Failed to obtain load average
");
return NULL;
}
return NULL;
}
- return bprintf(
fmt
, avgs[0], avgs[1], avgs[2]);
+ return bprintf(
"%.2f %.2f %.2f"
, avgs[0], avgs[1], avgs[2]);
}
}