mirror of
git://git.suckless.org/slstatus
synced 2024-12-13 01:45:17 +00:00
kernel_release() coding style and position in code fix
This commit is contained in:
parent
1a143566e6
commit
7392dbabeb
24
slstatus.c
24
slstatus.c
@ -52,6 +52,7 @@ static char *entropy(void);
|
|||||||
static char *gid(void);
|
static char *gid(void);
|
||||||
static char *hostname(void);
|
static char *hostname(void);
|
||||||
static char *ip(const char *iface);
|
static char *ip(const char *iface);
|
||||||
|
static char *kernel_release(void);
|
||||||
static char *load_avg(void);
|
static char *load_avg(void);
|
||||||
static char *ram_free(void);
|
static char *ram_free(void);
|
||||||
static char *ram_perc(void);
|
static char *ram_perc(void);
|
||||||
@ -69,7 +70,6 @@ static char *username(void);
|
|||||||
static char *vol_perc(const char *card);
|
static char *vol_perc(const char *card);
|
||||||
static char *wifi_perc(const char *iface);
|
static char *wifi_perc(const char *iface);
|
||||||
static char *wifi_essid(const char *iface);
|
static char *wifi_essid(const char *iface);
|
||||||
static char *kernel_release(void);
|
|
||||||
static void set_status(const char *str);
|
static void set_status(const char *str);
|
||||||
static void sighandler(const int signo);
|
static void sighandler(const int signo);
|
||||||
static void usage(void);
|
static void usage(void);
|
||||||
@ -316,6 +316,18 @@ ip(const char *iface)
|
|||||||
return smprintf(UNKNOWN_STR);
|
return smprintf(UNKNOWN_STR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *
|
||||||
|
kernel_release(void)
|
||||||
|
{
|
||||||
|
struct utsname udata;
|
||||||
|
|
||||||
|
if (uname(&udata) < 0) {
|
||||||
|
return smprintf(UNKNOWN_STR);
|
||||||
|
}
|
||||||
|
|
||||||
|
return smprintf("%s", udata.release);
|
||||||
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
load_avg(void)
|
load_avg(void)
|
||||||
{
|
{
|
||||||
@ -723,16 +735,6 @@ wifi_essid(const char *iface)
|
|||||||
return smprintf("%s", (char *)wreq.u.essid.pointer);
|
return smprintf("%s", (char *)wreq.u.essid.pointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
|
||||||
kernel_release(void)
|
|
||||||
{
|
|
||||||
struct utsname udata;
|
|
||||||
if (uname(&udata) < 0)
|
|
||||||
return smprintf(UNKNOWN_STR);
|
|
||||||
|
|
||||||
return smprintf("%s", udata.release);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_status(const char *str)
|
set_status(const char *str)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user