aruu

[MIRROR] Actual replacement for Busybox | suckless
git clone https://git.daat.foo/aruu.git
Log | Files | Refs | README | LICENSE

sysinfo_posix.c (567B)


      1 #include "../sysinfo.h"
      2 
      3 #include <errno.h>
      4 #include <string.h>
      5 
      6 #if !defined(__linux__) || defined(ARUU_FORCE_POSIX)
      7 int
      8 get_uptime(long *uptime_secs)
      9 {
     10   (void)uptime_secs;
     11   errno = ENOTSUP;
     12   return -1;
     13 }
     14 
     15 int
     16 get_meminfo(struct MemInfo *mi)
     17 {
     18   memset(mi, 0, sizeof(*mi));
     19   errno = ENOTSUP;
     20   return -1;
     21 }
     22 
     23 ssize_t
     24 get_dmesg(char *buf, size_t len)
     25 {
     26   (void)buf;
     27   (void)len;
     28   errno = ENOTSUP;
     29   return -1;
     30 }
     31 
     32 int
     33 clear_dmesg(void)
     34 {
     35   errno = ENOTSUP;
     36   return -1;
     37 }
     38 
     39 int
     40 set_console_level(int level)
     41 {
     42   (void)level;
     43   errno = ENOTSUP;
     44   return -1;
     45 }
     46 #endif