From: Andre Noll Date: Mon, 5 Aug 2013 10:46:39 +0000 (+0200) Subject: Print directory name on create errors. X-Git-Tag: v1.0.0~18 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=2a506d3256329ead41afe0bb720fdeae4e5ed08c;p=adu.git Print directory name on create errors. In create mode, if the database directory already exists, adu prints an error message of the form main: directory exists. This is a bit sparse, so let's add a log message which prints the directory name. With the patch applied the output becomes open_dir_table: could not create /ebio/maan/tmp/adu-lists/ main: directory exists --- diff --git a/adu.c b/adu.c index 6d4780e..0cd1644 100644 --- a/adu.c +++ b/adu.c @@ -208,8 +208,10 @@ int open_dir_table(int create) goto out; NOTICE_LOG("creating dir table\n"); ret = osl(osl_create_table(&dir_table_desc)); - if (ret < 0) + if (ret < 0) { + ERROR_LOG("could not create %s\n", dir_table_desc.dir); goto out; + } } INFO_LOG("opening dir table\n"); return osl(osl_open_table(&dir_table_desc, &dir_table));