1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 14:16:00 +00:00

refactor code

Added common functions autoconf_check_readable and fail.
Added some TODOs for later completion.
Updated messages from upstream plugins.
This commit is contained in:
Helmut Grohne 2013-02-05 12:38:12 +01:00
parent e71641b88f
commit bb7bf0bcd7
15 changed files with 97 additions and 166 deletions

View file

@ -25,10 +25,8 @@ int processes(int argc, char **argv) {
if(!strcmp(argv[1], "autoconf"))
return writeyes();
}
if(!(d = opendir("/proc"))) {
fputs("cannot open /proc\n", stderr);
return 1;
}
if(!(d = opendir("/proc")))
return fail("cannot open /proc");
while((e = readdir(d))) {
for(s=e->d_name;*s;++s)
if(!isdigit(*s))