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

Report error on update node request with bad state.

parent 0ab7161f
No related branches found
No related tags found
No related merge requests found
...@@ -1670,7 +1670,7 @@ _update_node (int argc, char *argv[]) ...@@ -1670,7 +1670,7 @@ _update_node (int argc, char *argv[])
state_val = (uint16_t) j; state_val = (uint16_t) j;
break; break;
} }
if (strcmp(node_state_string(j),"END") == 0) { if (j == NODE_STATE_END) {
exit_code = 1; exit_code = 1;
fprintf(stderr, "Invalid input: %s\n", fprintf(stderr, "Invalid input: %s\n",
argv[i]); argv[i]);
...@@ -1684,7 +1684,7 @@ _update_node (int argc, char *argv[]) ...@@ -1684,7 +1684,7 @@ _update_node (int argc, char *argv[])
fprintf (stderr, "\n"); fprintf (stderr, "\n");
goto done; goto done;
} }
} }
node_msg.node_state = state_val; node_msg.node_state = state_val;
update_cnt++; update_cnt++;
} }
......
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