From 1b4ea379d627d2281b957d79dfbebd42b9e73fbf Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Tue, 16 Mar 2004 21:10:27 +0000
Subject: [PATCH] Report read_slurm_conf error based upon function return code
 rather than errno (which is not reset by the function).

---
 src/slurmctld/controller.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c
index 06b6219e5eb..e512ea6c8eb 100644
--- a/src/slurmctld/controller.c
+++ b/src/slurmctld/controller.c
@@ -148,8 +148,8 @@ int main(int argc, char *argv[])
 
 	/* Get SlurmctldPidFile for _kill_old_slurmctld */
 	if ((error_code = read_slurm_conf_ctl (&slurmctld_conf)))
-		fatal("read_slurm_conf_ctl reading %s: %m",
-		      SLURM_CONFIG_FILE);
+		fatal("read_slurm_conf_ctl reading %s: %s",
+		      SLURM_CONFIG_FILE, slurm_strerror(error_code));
 	update_logging();
 	_kill_old_slurmctld();
 
@@ -229,9 +229,9 @@ int main(int argc, char *argv[])
 			(void) _shutdown_backup_controller(SHUTDOWN_WAIT);
 			/* Now recover the remaining state information */
 			if ((error_code = read_slurm_conf(recover))) {
-				error("read_slurm_conf reading %s: %m",
-					SLURM_CONFIG_FILE);
-				abort();
+				fatal("read_slurm_conf reading %s: %s",
+					SLURM_CONFIG_FILE,
+					slurm_strerror(error_code));
 			}
 		} else {
 			error("this host (%s) not valid controller (%s or %s)",
-- 
GitLab