slstatus

status monitor
git clone git://git.suckless.org/slstatus
Log | Files | Refs | README | LICENSE

kernel_release.c (327B)


      1 /* See LICENSE file for copyright and license details. */
      2 #include <stdio.h>
      3 #include <sys/utsname.h>
      4 
      5 #include "../slstatus.h"
      6 #include "../util.h"
      7 
      8 const char *
      9 kernel_release(const char *unused)
     10 {
     11 	struct utsname udata;
     12 
     13 	if (uname(&udata) < 0) {
     14 		warn("uname:");
     15 		return NULL;
     16 	}
     17 
     18 	return bprintf("%s", udata.release);
     19 }