slstatus/components/Linux/entropy.c
2018-04-30 15:41:31 +02:00

14 lines
265 B
C

/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include "../../util.h"
const char *
entropy(void)
{
int num;
return (pscanf("/proc/sys/kernel/random/entropy_avail", "%d", &num) == 1) ?
bprintf("%d", num) : NULL;
}