1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00
Munin-Contrib/tools/munin-plugins-busybox/common.c
2013-01-28 16:35:25 +01:00

23 lines
337 B
C

#include <stdio.h>
#include <stdlib.h>
int writeyes(void) {
puts("yes");
return 0;
}
int writeno(const char *s) {
if(s)
printf("no (%s)\n", s);
else
puts("no");
return 1;
}
int getenvint(const char *name, int defvalue) {
const char *value;
value = getenv(name);
if(value == NULL)
return defvalue;
return atoi(value);
}