summaryrefslogtreecommitdiff
path: root/slstatus.c
diff options
context:
space:
mode:
authorAaron Marcher <info@nulltime.net>2016-12-29 23:27:44 +0100
committerGitHub <noreply@github.com>2016-12-29 23:27:44 +0100
commit015f832c3a52a7c49c0181d85ab39eec7b8489a0 (patch)
tree16dd82f604dcc96db25d152dd986506366d952da /slstatus.c
parent0a3aa0b4e6dac661f3c318ac3f61e01668442903 (diff)
parent7392dbabebe69187618f31301a7842d4d2993966 (diff)
Merge branch 'master' into master
Diffstat (limited to 'slstatus.c')
-rw-r--r--slstatus.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/slstatus.c b/slstatus.c
index ac4c962..46e13c9 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -51,6 +51,7 @@ static char *entropy(void);
static char *gid(void);
static char *hostname(void);
static char *ip(const char *iface);
+static char *kernel_release(void);
static char *load_avg(void);
static char *ram_free(void);
static char *ram_perc(void);
@@ -68,7 +69,6 @@ static char *username(void);
static char *vol_perc(const char *card);
static char *wifi_perc(const char *iface);
static char *wifi_essid(const char *iface);
-static char *kernel_release(void);
static void sighandler(const int signo);
static void usage(int);
@@ -315,6 +315,18 @@ ip(const char *iface)
}
static char *
+kernel_release(void)
+{
+ struct utsname udata;
+
+ if (uname(&udata) < 0) {
+ return smprintf(UNKNOWN_STR);
+ }
+
+ return smprintf("%s", udata.release);
+}
+
+static char *
load_avg(void)
{
double avgs[3];
@@ -737,16 +749,6 @@ wifi_essid(const char *iface)
return smprintf("%s", (char *)wreq.u.essid.pointer);
}
-static char *
-kernel_release(void)
-{
- struct utsname udata;
- if (uname(&udata) < 0)
- return smprintf("%s", UNKNOWN_STR);
-
- return smprintf("%s", udata.release);
-}
-
static void
sighandler(const int signo)
{