From 7acec70fb9e35293ddfaea21f78637f7277f48d9 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Fri, 6 Nov 2009 18:44:34 +0000 Subject: [PATCH] svn merge -r18976:18989 https://eris.llnl.gov/svn/slurm/branches/slurm-2.0 --- NEWS | 1 + src/squeue/print.c | 19 ++++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 1e63cdc4f41..939fa8b8108 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 2b84fe99365..9a860ccf54f 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; } -- GitLab