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

Recognize numeric suffix at any point in hostname (previously was

hardwired to 3 characters (e.g. "bgl").
parent d0a34048
No related branches found
No related tags found
No related merge requests found
...@@ -388,6 +388,7 @@ void pa_init(node_info_msg_t *node_info_ptr) ...@@ -388,6 +388,7 @@ void pa_init(node_info_msg_t *node_info_ptr)
node_info_t *node_ptr; node_info_t *node_ptr;
int i; int i;
int start, temp; int start, temp;
char *numeric;
/* if we've initialized, just pop off all the old crusty /* if we've initialized, just pop off all the old crusty
* pa_systems */ * pa_systems */
...@@ -409,7 +410,17 @@ void pa_init(node_info_msg_t *node_info_ptr) ...@@ -409,7 +410,17 @@ void pa_init(node_info_msg_t *node_info_ptr)
if(node_info_ptr!=NULL) { if(node_info_ptr!=NULL) {
for (i = 0; i < node_info_ptr->record_count; i++) { for (i = 0; i < node_info_ptr->record_count; i++) {
node_ptr = &node_info_ptr->node_array[i]; node_ptr = &node_info_ptr->node_array[i];
start = atoi(node_ptr->name + 3); start = 0;
numeric = node_ptr->name;
while (numeric) {
if ((numeric[0] < '0')
|| (numeric[0] > '9')) {
numeric++;
continue;
}
start = atoi(numeric);
break;
}
#ifdef HAVE_BGL #ifdef HAVE_BGL
temp = start / 100; temp = start / 100;
if (DIM_SIZE[X] < temp) if (DIM_SIZE[X] < temp)
......
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