diff --git a/NEWS b/NEWS index f7fb85661d49fbe3dd0dcf7b3c044df52491422a..e79a6243059949bb3b5417a193ced900fbe49e7c 100644 --- a/NEWS +++ b/NEWS @@ -296,6 +296,8 @@ documents those changes that are of interest to users and administrators. "Not responding". -- For job resize, correct logic to build "resize" script with new values. Previously the scripts were based upon the original job size. + -- Fix squeue to not limit the size of partition, burst_buffer, exec_host, or + reason to 32 chars. * Changes in Slurm 16.05.9 ========================== diff --git a/src/squeue/print.c b/src/squeue/print.c index eba57d9e3554e33fa38661af856d21ba76942068..f779d6f9d1d39e3fb7285c7817591d1cea618453 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -521,10 +521,7 @@ int _print_job_batch_host(job_info_t * job, int width, bool right, char* suffix) _print_str("EXEC_HOST", width, right, true); else { char *eh = job->batch_flag ? job->batch_host : job->alloc_node; - char id[FORMAT_STRING_SIZE]; - - snprintf(id, FORMAT_STRING_SIZE, "%s", eh ? eh : "n/a"); - _print_str(id, width, right, true); + _print_str(eh ? eh : "n/a", width, right, true); } if (suffix) printf("%s", suffix); @@ -536,9 +533,7 @@ int _print_job_burst_buffer(job_info_t * job, int width, bool right, char* suffi if (job == NULL) /* Print the Header instead */ _print_str("BURST_BUFFER", width, right, true); else { - char id[FORMAT_STRING_SIZE]; - snprintf(id, FORMAT_STRING_SIZE, "%s", job->burst_buffer); - _print_str(id, width, right, true); + _print_str(job->burst_buffer, width, right, true); } if (suffix) printf("%s", suffix); @@ -645,9 +640,7 @@ int _print_job_partition(job_info_t * job, int width, bool right, char* suffix) if (job == NULL) /* Print the Header instead */ _print_str("PARTITION", width, right, true); else { - char id[FORMAT_STRING_SIZE]; - snprintf(id, FORMAT_STRING_SIZE, "%s", job->partition); - _print_str(id, width, right, true); + _print_str(job->partition, width, right, true); } if (suffix) printf("%s", suffix); @@ -666,13 +659,12 @@ int _print_job_reason(job_info_t * job, int width, bool right, char* suffix) if (job == NULL) /* Print the Header instead */ _print_str("REASON", width, right, true); else { - char id[FORMAT_STRING_SIZE], *reason; + char *reason; if (job->state_desc) reason = job->state_desc; else reason = job_reason_string(job->state_reason); - snprintf(id, FORMAT_STRING_SIZE, "%s", reason); - _print_str(id, width, right, true); + _print_str(reason, width, right, true); } if (suffix) printf("%s", suffix); @@ -2156,13 +2148,10 @@ int _print_step_id(job_step_info_t * step, int width, bool right, char* suffix) int _print_step_partition(job_step_info_t * step, int width, bool right, char* suffix) { - char id[FORMAT_STRING_SIZE]; - if (step == NULL) /* Print the Header instead */ _print_str("PARTITION", width, right, true); else { - snprintf(id, FORMAT_STRING_SIZE, "%s", step->partition); - _print_str(id, width, right, true); + _print_str(step->partition, width, right, true); } if (suffix) printf("%s", suffix);