slstatus

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

kernel_release.c (288B)


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