Skip to content
Snippets Groups Projects
Commit dfc039c5 authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Fix for missing linefeed when the Reason (or other fields) are large.

parent 76592738
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,7 @@ slurm_sprint_node_table (node_info_t * node_ptr, int one_liner ) ...@@ -110,7 +110,7 @@ slurm_sprint_node_table (node_info_t * node_ptr, int one_liner )
{ {
uint16_t my_state = node_ptr->node_state; uint16_t my_state = node_ptr->node_state;
char *comp_str = "", *drain_str = ""; char *comp_str = "", *drain_str = "";
char tmp_line[100]; char tmp_line[512];
char *out = NULL; char *out = NULL;
if (my_state & NODE_STATE_COMPLETING) { if (my_state & NODE_STATE_COMPLETING) {
...@@ -138,11 +138,12 @@ slurm_sprint_node_table (node_info_t * node_ptr, int one_liner ) ...@@ -138,11 +138,12 @@ slurm_sprint_node_table (node_info_t * node_ptr, int one_liner )
/****** Line 2 ******/ /****** Line 2 ******/
snprintf(tmp_line, sizeof(tmp_line), snprintf(tmp_line, sizeof(tmp_line),
"Sockets=%u Cores=%u Threads=%u " "Sockets=%u Cores=%u Threads=%u "
"Weight=%u Features=%s Reason=%s\n" , "Weight=%u Features=%s Reason=%s" ,
node_ptr->sockets, node_ptr->cores, node_ptr->threads, node_ptr->sockets, node_ptr->cores, node_ptr->threads,
node_ptr->weight, node_ptr->features, node_ptr->weight, node_ptr->features,
node_ptr->reason); node_ptr->reason);
xstrcat(out, tmp_line); xstrcat(out, tmp_line);
xstrcat(out, "\n");
return out; return out;
} }
......
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