summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d8915c)
raw | patch | inline | side by side (parent: 2d8915c)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 10 Mar 2009 19:48:54 +0000 (20:48 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 17 Mar 2009 08:35:22 +0000 (09:35 +0100) |
src/configfile.c | patch | blob | history | |
src/types_list.c | patch | blob | history |
diff --git a/src/configfile.c b/src/configfile.c
index bb57ca26a23e77444b8bafb157e385b8468c84e5..580b24b697912a5db83edc42ea417e18a2099069 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
cf_default_typesdb = 0;
- if (ci->values_num < 1)
+ if (ci->values_num < 1) {
+ ERROR ("configfile: `TypesDB' needs at least one argument.");
return (-1);
+ }
for (i = 0; i < ci->values_num; ++i)
{
- if (OCONFIG_TYPE_STRING != ci->values[i].type)
+ if (OCONFIG_TYPE_STRING != ci->values[i].type) {
+ WARNING ("configfile: TypesDB: Skipping %i. argument which "
+ "is not a string.", i + 1);
continue;
+ }
read_types_list (ci->values[i].value.string);
}
diff --git a/src/types_list.c b/src/types_list.c
index 7600c346ecc1e8c901460a029c2ead4c167e5576..ed832fee0baf7721a1de9ab5610741d283882332 100644 (file)
--- a/src/types_list.c
+++ b/src/types_list.c
if (fh == NULL)
{
char errbuf[1024];
- ERROR ("open (%s) failed: %s",
+ fprintf (stderr, "Failed to open types database `%s': %s.\n",
+ file, sstrerror (errno, errbuf, sizeof (errbuf)));
+ ERROR ("Failed to open types database `%s': %s",
file, sstrerror (errno, errbuf, sizeof (errbuf)));
return (-1);
}