Commit 7fb87516 authored by Daniel Salzman's avatar Daniel Salzman

conf: return a better code based on errno

parent 0e120df1
......@@ -195,7 +195,8 @@ int conf_new(
char tpl[] = "/tmp/knot-confdb.XXXXXX";
lmdb_opts.path = mkdtemp(tpl);
if (lmdb_opts.path == NULL) {
CONF_LOG(LOG_ERR, "failed to create temporary directory");
CONF_LOG(LOG_ERR, "failed to create temporary directory (%s)",
goto new_error;
......@@ -874,7 +875,7 @@ int conf_export(
FILE *fp = fopen(file_name, "w");
if (fp == NULL) {
return KNOT_EFILE;
return knot_map_errno();
fprintf(fp, "# Configuration export (Knot DNS %s)\n\n", PACKAGE_VERSION);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment