Implement optional syslog logging using ordinary

bb_xx_msg calls, and convert networking/* to it.
The rest of bbox will be converted gradually.
This commit is contained in:
Denis Vlasenko
2006-09-06 18:36:50 +00:00
parent 5d725462d4
commit 3538b9a882
39 changed files with 296 additions and 366 deletions

View File

@ -515,16 +515,16 @@ str2val(const char *str, const char *what, int mi, int ma)
} else
val = (int)strtol(str, &ep, 10);
if (*ep != '\0') {
bb_error_msg_and_die("\"%s\" bad value for %s \n", str, what);
bb_error_msg_and_die("\"%s\" bad value for %s", str, what);
}
if (val < mi && mi >= 0) {
if (mi == 0)
bb_error_msg_and_die("%s must be >= %d\n", what, mi);
bb_error_msg_and_die("%s must be >= %d", what, mi);
else
bb_error_msg_and_die("%s must be > %d\n", what, mi - 1);
bb_error_msg_and_die("%s must be > %d", what, mi - 1);
}
if (val > ma && ma >= 0)
bb_error_msg_and_die("%s must be <= %d\n", what, ma);
bb_error_msg_and_die("%s must be <= %d", what, ma);
return val;
}