My slstatus configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
360 B

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