Skip to content
Snippets Groups Projects
Commit 5a27bd9c authored by Moe Jette's avatar Moe Jette
Browse files

Modify smap to build on non-BGL system.

parent dd8fe34b
No related branches found
No related tags found
No related merge requests found
...@@ -276,6 +276,7 @@ static char *_part_state_str(rm_partition_state_t state) ...@@ -276,6 +276,7 @@ static char *_part_state_str(rm_partition_state_t state)
{ {
static char tmp[16]; static char tmp[16];
#ifdef HAVE_BGL_FILES
switch (state) { switch (state) {
case RM_PARTITION_BUSY: case RM_PARTITION_BUSY:
return "BUSY"; return "BUSY";
...@@ -291,10 +292,11 @@ static char *_part_state_str(rm_partition_state_t state) ...@@ -291,10 +292,11 @@ static char *_part_state_str(rm_partition_state_t state)
return "NAV"; return "NAV";
case RM_PARTITION_READY: case RM_PARTITION_READY:
return "READY"; return "READY";
default:
snprintf(tmp, sizeof(tmp), "%d", state);
return tmp;
} }
#endif
snprintf(tmp, sizeof(tmp), "%d", state);
return tmp;
} }
static int _print_text_part(partition_info_t * part_ptr, static int _print_text_part(partition_info_t * part_ptr,
...@@ -787,8 +789,14 @@ static db2_block_info_t *_find_part_db2(char *nodelist) ...@@ -787,8 +789,14 @@ static db2_block_info_t *_find_part_db2(char *nodelist)
hostlist_destroy(hostlist); hostlist_destroy(hostlist);
return rc; return rc;
#else #else
static db2_block_info_t dummy_block = {"UNKNOWN", "", SELECT_NAV, static db2_block_info_t dummy_block;
SELECT_NAV_MODE, NULL};
/* perform block initialization (once) using structure field names */
if (dummy_block.bgl_block_name == NULL) {
dummy_block.bgl_block_name = "UNKNOWN";
dummy_block.bgl_conn_type = SELECT_NAV;
dummy_block.bgl_node_use = SELECT_NAV_MODE;
}
return &dummy_block; return &dummy_block;
#endif #endif
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
typedef char * pm_partition_id_t; typedef char * pm_partition_id_t;
typedef int rm_connection_type_t; typedef int rm_connection_type_t;
typedef int rm_partition_mode_t; typedef int rm_partition_mode_t;
typedef int rm_partition_state_t;
typedef uint16_t rm_partition_t; typedef uint16_t rm_partition_t;
typedef char * rm_BGL_t; typedef char * rm_BGL_t;
typedef char * rm_component_id_t; typedef char * rm_component_id_t;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment