mirror of https://github.com/getdnsapi/getdns.git
Print exit status at end of main output line.
This commit is contained in:
parent
5d4bc8bc96
commit
c0d7d2c279
|
@ -983,6 +983,24 @@ int main(int ATTR_UNUSED(ac), char *av[])
|
||||||
++f) {
|
++f) {
|
||||||
if (strcmp(testname, f->name) == 0) {
|
if (strcmp(testname, f->name) == 0) {
|
||||||
exit_value_t xit = f->func(&test_info, av);
|
exit_value_t xit = f->func(&test_info, av);
|
||||||
|
switch(xit) {
|
||||||
|
case 0:
|
||||||
|
fputs(" OK", test_info.errout);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
fputs(" WARNING", test_info.errout);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
fputs(" CRITICAL", test_info.errout);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
fputs(" UNKNOWN", test_info.errout);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
fputc('\n', test_info.errout);
|
fputc('\n', test_info.errout);
|
||||||
exit(xit);
|
exit(xit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue