From 6ee6d6872b551f67b6046ed2d1107a5e84bb98d6 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@schedmd.com> Date: Mon, 18 Jul 2011 13:28:01 -0700 Subject: [PATCH] BLUEGENE - moved function from one place to another to access from the common .la for the block allocator --- src/plugins/select/bluegene/ba_common.c | 18 ++++++++++++++++++ src/plugins/select/bluegene/ba_common.h | 2 ++ src/plugins/select/bluegene/bg_node_info.c | 18 ------------------ src/plugins/select/bluegene/bg_node_info.h | 2 -- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/plugins/select/bluegene/ba_common.c b/src/plugins/select/bluegene/ba_common.c index 36bf6c5b28e..e2c85d88828 100644 --- a/src/plugins/select/bluegene/ba_common.c +++ b/src/plugins/select/bluegene/ba_common.c @@ -1614,3 +1614,21 @@ extern char *ba_passthroughs_string(uint16_t passthrough) return pass; } +/* This is defined here so we can get it on non-bluegene systems since + * it is needed in pack/unpack functions, and bluegene.c isn't + * compiled for non-bluegene machines, and it didn't make since to + * compile the whole file just for this one function. + */ +extern char *give_geo(uint16_t *int_geo, int dims, bool with_sep) +{ + char *geo = NULL; + int i; + + for (i=0; i<dims; i++) { + if (geo && with_sep) + xstrcat(geo, "x"); + xstrfmtcat(geo, "%c", alpha_num[int_geo[i]]); + } + return geo; +} + diff --git a/src/plugins/select/bluegene/ba_common.h b/src/plugins/select/bluegene/ba_common.h index e5739ce7868..d21ae0af2a6 100644 --- a/src/plugins/select/bluegene/ba_common.h +++ b/src/plugins/select/bluegene/ba_common.h @@ -548,4 +548,6 @@ extern char *ba_set_ionode_str(bitstr_t *bitmap); * Caller MUST xfree() the returned value */ extern char *ba_passthroughs_string(uint16_t passthrough); +extern char *give_geo(uint16_t *int_geo, int dims, bool with_sep); + #endif diff --git a/src/plugins/select/bluegene/bg_node_info.c b/src/plugins/select/bluegene/bg_node_info.c index 9e2278b1603..90fba7cd761 100644 --- a/src/plugins/select/bluegene/bg_node_info.c +++ b/src/plugins/select/bluegene/bg_node_info.c @@ -126,24 +126,6 @@ unpack_error: return SLURM_ERROR; } -/* This is defined here so we can get it on non-bluegene systems since - * it is needed in pack/unpack functions, and bluegene.c isn't - * compiled for non-bluegene machines, and it didn't make since to - * compile the whole file just for this one function. - */ -extern char *give_geo(uint16_t *int_geo, int dims, bool with_sep) -{ - char *geo = NULL; - int i; - - for (i=0; i<dims; i++) { - if (geo && with_sep) - xstrcat(geo, "x"); - xstrfmtcat(geo, "%c", alpha_num[int_geo[i]]); - } - return geo; -} - extern int select_nodeinfo_pack(select_nodeinfo_t *nodeinfo, Buf buffer, uint16_t protocol_version) { diff --git a/src/plugins/select/bluegene/bg_node_info.h b/src/plugins/select/bluegene/bg_node_info.h index 4fea4fe15b5..d6ce37ca013 100644 --- a/src/plugins/select/bluegene/bg_node_info.h +++ b/src/plugins/select/bluegene/bg_node_info.h @@ -59,8 +59,6 @@ struct select_nodeinfo { List subgrp_list; }; -extern char *give_geo(uint16_t *int_geo, int dims, bool with_sep); - extern int select_nodeinfo_pack(select_nodeinfo_t *nodeinfo, Buf buffer, uint16_t protocol_version); -- GitLab