From f1a121b4f830094942f69eaa09760a9deb72aca8 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Wed, 17 Aug 2011 11:21:19 -0700
Subject: [PATCH] Revert "BLUEGENE - move function into common location for
 smap to be able to see."

This reverts commit e245c7bdef372baf4ea973c0e61deacd43864957.
---
 src/plugins/select/bluegene/ba_common.c | 47 ------------------------
 src/plugins/select/bluegene/ba_common.h |  2 --
 src/plugins/select/bluegene/bg_core.c   | 48 +++++++++++++++++++++++++
 src/plugins/select/bluegene/bg_core.h   |  1 +
 4 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/src/plugins/select/bluegene/ba_common.c b/src/plugins/select/bluegene/ba_common.c
index 71111fadd7f..dd31800f102 100644
--- a/src/plugins/select/bluegene/ba_common.c
+++ b/src/plugins/select/bluegene/ba_common.c
@@ -1639,50 +1639,3 @@ extern char *give_geo(uint16_t *int_geo, int dims, bool with_sep)
 	return geo;
 }
 
-/*
- * Convert a BG API error code to a string
- * IN inx - error code from any of the BG Bridge APIs
- * RET - string describing the error condition
- */
-extern const char *bg_err_str(int inx)
-{
-	static char tmp_char[10];
-
-	switch (inx) {
-	case SLURM_SUCCESS:
-		return "Slurm Success";
-	case SLURM_ERROR:
-		return "Slurm Error";
-	case BG_ERROR_BLOCK_NOT_FOUND:
-		return "Block not found";
-	case BG_ERROR_BOOT_ERROR:
-		return "Block boot error";
-	case BG_ERROR_JOB_NOT_FOUND:
-		return "Job not found";
-	case BG_ERROR_MP_NOT_FOUND:
-		return "Midplane not found";
-	case BG_ERROR_SWITCH_NOT_FOUND:
-		return "Switch not found";
-	case BG_ERROR_BLOCK_ALREADY_DEFINED:
-		return "Block already defined";
-	case BG_ERROR_JOB_ALREADY_DEFINED:
-		return "Job already defined";
-	case BG_ERROR_CONNECTION_ERROR:
-		return "Connection error";
-	case BG_ERROR_INTERNAL_ERROR:
-		return "Internal error";
-	case BG_ERROR_INVALID_INPUT:
-		return "Invalid input";
-	case BG_ERROR_INCONSISTENT_DATA:
-		return "Inconsistent data";
-	case BG_ERROR_NO_IOBLOCK_CONNECTED:
-		return "No IO Block Connected";
-	}
-	/* I know this isn't the best way to handle this, but it only
-	   happens very rarely and usually in debugging, so it
-	   hopefully isn't really all that bad.
-	*/
-	snprintf(tmp_char, sizeof(tmp_char), "%u ?", inx);
-	return tmp_char;
-}
-
diff --git a/src/plugins/select/bluegene/ba_common.h b/src/plugins/select/bluegene/ba_common.h
index c243928f3ad..e6e7e1a1ce1 100644
--- a/src/plugins/select/bluegene/ba_common.h
+++ b/src/plugins/select/bluegene/ba_common.h
@@ -552,6 +552,4 @@ extern char *ba_passthroughs_string(uint16_t passthrough);
 
 extern char *give_geo(uint16_t *int_geo, int dims, bool with_sep);
 
-extern const char *bg_err_str(int inx);
-
 #endif
diff --git a/src/plugins/select/bluegene/bg_core.c b/src/plugins/select/bluegene/bg_core.c
index 01fb3b6e530..74e1743a5ca 100644
--- a/src/plugins/select/bluegene/bg_core.c
+++ b/src/plugins/select/bluegene/bg_core.c
@@ -554,3 +554,51 @@ extern int node_already_down(char *node_name)
 
 	return 0;
 }
+
+/*
+ * Convert a BG API error code to a string
+ * IN inx - error code from any of the BG Bridge APIs
+ * RET - string describing the error condition
+ */
+extern const char *bg_err_str(int inx)
+{
+	static char tmp_char[10];
+
+	switch (inx) {
+	case SLURM_SUCCESS:
+		return "Slurm Success";
+	case SLURM_ERROR:
+		return "Slurm Error";
+	case BG_ERROR_BLOCK_NOT_FOUND:
+		return "Block not found";
+	case BG_ERROR_BOOT_ERROR:
+		return "Block boot error";
+	case BG_ERROR_JOB_NOT_FOUND:
+		return "Job not found";
+	case BG_ERROR_MP_NOT_FOUND:
+		return "Midplane not found";
+	case BG_ERROR_SWITCH_NOT_FOUND:
+		return "Switch not found";
+	case BG_ERROR_BLOCK_ALREADY_DEFINED:
+		return "Block already defined";
+	case BG_ERROR_JOB_ALREADY_DEFINED:
+		return "Job already defined";
+	case BG_ERROR_CONNECTION_ERROR:
+		return "Connection error";
+	case BG_ERROR_INTERNAL_ERROR:
+		return "Internal error";
+	case BG_ERROR_INVALID_INPUT:
+		return "Invalid input";
+	case BG_ERROR_INCONSISTENT_DATA:
+		return "Inconsistent data";
+	case BG_ERROR_NO_IOBLOCK_CONNECTED:
+		return "No IO Block Connected";
+	}
+	/* I know this isn't the best way to handle this, but it only
+	   happens very rarely and usually in debugging, so it
+	   hopefully isn't really all that bad.
+	*/
+	snprintf(tmp_char, sizeof(tmp_char), "%u ?", inx);
+	return tmp_char;
+}
+
diff --git a/src/plugins/select/bluegene/bg_core.h b/src/plugins/select/bluegene/bg_core.h
index 788a97f0e6d..7277a7824d7 100644
--- a/src/plugins/select/bluegene/bg_core.h
+++ b/src/plugins/select/bluegene/bg_core.h
@@ -81,6 +81,7 @@ extern int free_block_list(uint32_t job_id, List track_list,
 			   bool destroy, bool wait);
 extern int read_bg_conf();
 extern int node_already_down(char *node_name);
+extern const char *bg_err_str(int inx);
 
 #endif /* _BG_CORE_H_ */
 
-- 
GitLab