swap: OS split
This commit is contained in:
parent
259e106b4f
commit
72f5a0d69a
2
Makefile
2
Makefile
|
@ -20,7 +20,7 @@ COM =\
|
||||||
components/num_files\
|
components/num_files\
|
||||||
components/$(OS)/ram \
|
components/$(OS)/ram \
|
||||||
components/run_command\
|
components/run_command\
|
||||||
components/swap\
|
components/$(OS)/swap \
|
||||||
components/temperature\
|
components/temperature\
|
||||||
components/uptime\
|
components/uptime\
|
||||||
components/user\
|
components/user\
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#if defined(__linux__)
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../util.h"
|
#include "../../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
swap_free(void)
|
swap_free(void)
|
||||||
|
@ -135,4 +134,3 @@ swap_used(void)
|
||||||
|
|
||||||
return bprintf("%f", (float)(total - free - cached) / 1024 / 1024);
|
return bprintf("%f", (float)(total - free - cached) / 1024 / 1024);
|
||||||
}
|
}
|
||||||
#endif
|
|
Loading…
Reference in New Issue