]> mj.ucw.cz Git - libucw.git/commitdiff
shell/config: check the default value from the command-line
authorRobert Spalek <robert@ucw.cz>
Thu, 27 Apr 2006 13:47:56 +0000 (15:47 +0200)
committerRobert Spalek <robert@ucw.cz>
Thu, 27 Apr 2006 13:47:56 +0000 (15:47 +0200)
lib/shell/config.c

index 21bf540d0f098b397ef47f3c5fc07561463f9c4b..f9fa9ae093c77ddc4faa67f7b6136e9d034f4638 100644 (file)
@@ -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++;
        }
     }