From 2a506d3256329ead41afe0bb720fdeae4e5ed08c Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 5 Aug 2013 12:46:39 +0200 Subject: [PATCH] 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 --- adu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); -- 2.39.2