Explorar el Código

vqsim: Fix down command

... ignoring all but the first node argument.

run_down_cmd() iterates over argv[1..argc-1] but resolves the node ID
from the fixed argv[1] on every iteration, so `down 2 3` only stops
node 2 and node 3 is never passed to cmd_stop_node().

Use argv[i] to index the current argument, matching the sibling up and
move commands.

Signed-off-by: shiyuan <shiyuan@kylinos.cn>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
shiyuan hace 3 días
padre
commit
d71850eb1f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      vqsim/parser.c

+ 1 - 1
vqsim/parser.c

@@ -280,7 +280,7 @@ static int run_down_cmd(int argc, char **argv)
 	cmd_start_sync_command();
 
 	for (i=1; i<argc; i++) {
-		nodeid = atoi(argv[1]);
+		nodeid = atoi(argv[i]);
 		if (!cmd_stop_node(nodeid)) {
 			succeeded++;
 		}