From: Robert Spalek Date: Thu, 27 Apr 2006 13:47:56 +0000 (+0200) Subject: shell/config: check the default value from the command-line X-Git-Tag: holmes-import~645^2~11^2~20 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=36b2d356aa1cd9a1871eb4ca36654ac8e7947439;p=libucw.git shell/config: check the default value from the command-line --- diff --git a/lib/shell/config.c b/lib/shell/config.c index 21bf540d..f9fa9ae0 100644 --- a/lib/shell/config.c +++ b/lib/shell/config.c @@ -161,8 +161,11 @@ int main(int argc, char **argv) c->number = (c->type & F_ARRAY) ? CF_ANY_NUM : 1; c->ptr = c; c->u.par = (cf_parser*) report; - if (e) - report(1, &e, c); + if (e) { + byte *err = report(1, &e, c); + if (err) + die("Cannot parse the default value #%d: %s", c-sec->cfg, err); + } c++; } }