components
battery.c
cpu.c
datetime.c
disk.c
entropy.c
hostname.c
ip.c
kernel_release.c
keyboard_indicators.c
keymap.c
load_avg.c
netspeeds.c
num_files.c
ram.c
run_command.c
separator.c
swap.c
temperature.c
uptime.c
user.c
volume.c
wifi.c
LICENSE
Makefile
README
arg.h
config.def.h
config.mk
slstatus.1
slstatus.c
slstatus.h
util.c
util.h

- Remove <errno.h> because related functions are in util.c now - Remove corresponding <string.h> if not used otherwise
19 lines
288 B
C
19 lines
288 B
C
/* See LICENSE file for copyright and license details. */
|
|
#include <sys/utsname.h>
|
|
#include <stdio.h>
|
|
|
|
#include "../util.h"
|
|
|
|
const char *
|
|
kernel_release(void)
|
|
{
|
|
struct utsname udata;
|
|
|
|
if (uname(&udata) < 0) {
|
|
warn("uname:");
|
|
return NULL;
|
|
}
|
|
|
|
return bprintf("%s", udata.release);
|
|
}
|