diff --git a/NEWS b/NEWS index 1e63cdc4f410b6c9d4951a8ccb22b50a79c061f9..939fa8b8108ad52b4d3a7c180da39ae121de9ed5 100644 --- a/NEWS +++ b/NEWS @@ -284,6 +284,7 @@ documents those changes that are of interest to users and admins. job has been suspended. -- Applied patch from Mark Grondona that fixes the validation of the PluginDir to support the colon separated list of directories as documented. + -- BLUEGENE - squeue -o %R now prints more readable info for small blocks * Changes in SLURM 2.0.7 ======================== diff --git a/src/squeue/print.c b/src/squeue/print.c index 2b84fe99365258abdaa8e975120ba441ecad5ce9..9a860ccf54f9d408841cbac388c18a5a40616119 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -592,8 +592,6 @@ int _print_job_nodes(job_info_t * job, int width, bool right, char* suffix) int _print_job_reason_list(job_info_t * job, int width, bool right, char* suffix) { - char *ionodes = NULL; - char tmp_char[16]; uint16_t base_state = 0; if (job) @@ -616,22 +614,21 @@ int _print_job_reason_list(job_info_t * job, int width, bool right, snprintf(id, FORMAT_STRING_SIZE, "(%s)", reason); _print_str(id, width, right, true); } else { -#ifdef HAVE_BG + char *nodes = xstrdup(job->nodes); + char *ionodes = NULL; select_g_select_jobinfo_get(job->select_jobinfo, SELECT_JOBDATA_IONODES, &ionodes); -#endif - - _print_nodes(job->nodes, width, right, false); if(ionodes) { - snprintf(tmp_char, sizeof(tmp_char), "[%s]", - ionodes); - _print_str(tmp_char, width, right, false); - } + xstrfmtcat(nodes, "[%s]", ionodes); + xfree(ionodes); + _print_str(nodes, width, right, false); + } else + _print_nodes(nodes, width, right, false); + xfree(nodes); } if (suffix) printf("%s", suffix); - xfree(ionodes); return SLURM_SUCCESS; }