summaryrefslogtreecommitdiff
path: root/src/irmd/configfile.c
diff options
context:
space:
mode:
authorThijs Paelman <[email protected]>2024-01-07 12:25:05 +0100
committerSander Vrijders <[email protected]>2024-01-13 10:20:14 +0100
commit67af6b4edf4fafef6a7bbf620c7b58d42a6e8155 (patch)
treec2cd1a989410821a7aa0b7d69db4a9536799a7f2 /src/irmd/configfile.c
parenta4c444b091d9ac9d189a7c475f68d6a51bd11ee5 (diff)
downloadouroboros-67af6b4edf4fafef6a7bbf620c7b58d42a6e8155.tar.gz
ouroboros-67af6b4edf4fafef6a7bbf620c7b58d42a6e8155.zip
irmd: Error when config not found
Error instead of warn when the --config param is set, but the file is not found. This prevents the IRMd from being in a 'half state', where it is started, but the expected config is not applied. One simply has to remove the --config option OR supply a correct filepath. Also fix compile option for the help message. Signed-off-by: Thijs Paelman <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/irmd/configfile.c')
-rw-r--r--src/irmd/configfile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/irmd/configfile.c b/src/irmd/configfile.c
index 35ea8659..35f526a1 100644
--- a/src/irmd/configfile.c
+++ b/src/irmd/configfile.c
@@ -820,8 +820,8 @@ int irm_configure(const char * path)
rp = realpath(path, NULL);
if (rp == NULL) {
- log_warn("Failed to resolve path for %s", path);
- return 0;
+ log_err("Failed to resolve path for %s", path);
+ goto fail_resolve;
}
log_info("Reading configuration from file %s", rp);
@@ -846,6 +846,7 @@ int irm_configure(const char * path)
fclose(fp);
fail_fopen:
free(rp);
+ fail_resolve:
return -1;
}