rather than using short opentions (e.g. "-p 0000:00:02.0"), use long options everywhere (e.g. "--parent=0000:00:02.0") Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- src/node_device/node_device_driver.c | 28 ++++++------------- ...19_36ea_4111_8f0a_8c9a70e21366-create.argv | 2 +- ...19_36ea_4111_8f0a_8c9a70e21366-define.argv | 2 +- ...39_495e_4243_ad9f_beb3f14c23d9-create.argv | 2 +- ...39_495e_4243_ad9f_beb3f14c23d9-define.argv | 2 +- ...16_1ca8_49ac_b176_871d16c13076-create.argv | 2 +- ...16_1ca8_49ac_b176_871d16c13076-define.argv | 2 +- tests/nodedevmdevctldata/mdevctl-start.argv | 2 +- tests/nodedevmdevctldata/mdevctl-stop.argv | 2 +- .../nodedevmdevctldata/mdevctl-undefine.argv | 2 +- 10 files changed, 18 insertions(+), 28 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 3236dd7bc3..e9147ec0f9 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -720,10 +720,9 @@ nodeDeviceGetMdevctlDefineCreateCommand(virNodeDeviceDef *def, return NULL; } - cmd = virCommandNewArgList(MDEVCTL, subcommand, - "-p", parent_addr, - "--jsonfile", "/dev/stdin", - NULL); + cmd = virCommandNewArgList(MDEVCTL, subcommand, NULL); + virCommandAddArgPair(cmd, "--parent", parent_addr); + virCommandAddArgPair(cmd, "--jsonfile", "/dev/stdin"); virCommandSetInputBuffer(cmd, json); @@ -887,11 +886,8 @@ nodeDeviceCreateXML(virConnectPtr conn, virCommandPtr nodeDeviceGetMdevctlStopCommand(const char *uuid, char **errmsg) { - virCommandPtr cmd = virCommandNewArgList(MDEVCTL, - "stop", - "-u", - uuid, - NULL); + virCommandPtr cmd = virCommandNewArgList(MDEVCTL, "stop", NULL); + virCommandAddArgPair(cmd, "--uuid", uuid); virCommandSetErrorBuffer(cmd, errmsg); return cmd; @@ -900,11 +896,8 @@ nodeDeviceGetMdevctlStopCommand(const char *uuid, char **errmsg) virCommand * nodeDeviceGetMdevctlUndefineCommand(const char *uuid, char **errmsg) { - virCommand *cmd = virCommandNewArgList(MDEVCTL, - "undefine", - "-u", - uuid, - NULL); + virCommand *cmd = virCommandNewArgList(MDEVCTL, "undefine", NULL); + virCommandAddArgPair(cmd, "--uuid", uuid); virCommandSetErrorBuffer(cmd, errmsg); return cmd; } @@ -912,11 +905,8 @@ nodeDeviceGetMdevctlUndefineCommand(const char *uuid, char **errmsg) virCommand* nodeDeviceGetMdevctlStartCommand(const char *uuid, char **errmsg) { - virCommand *cmd = virCommandNewArgList(MDEVCTL, - "start", - "-u", - uuid, - NULL); + virCommand *cmd = virCommandNewArgList(MDEVCTL, "start", NULL); + virCommandAddArgPair(cmd, "--uuid", uuid); virCommandSetErrorBuffer(cmd, errmsg); return cmd; } diff --git a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.argv b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.argv index 129f438e4a..90a12cdd61 100644 --- a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.argv +++ b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.argv @@ -1,2 +1,2 @@ -$MDEVCTL_BINARY$ start -p 0000:00:02.0 --jsonfile /dev/stdin \ +$MDEVCTL_BINARY$ start --parent=0000:00:02.0 --jsonfile=/dev/stdin \ --uuid=d069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv index 118ec7a8da..2dbde45872 100644 --- a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv +++ b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv @@ -1,2 +1,2 @@ -$MDEVCTL_BINARY$ define -p 0000:00:02.0 --jsonfile /dev/stdin \ +$MDEVCTL_BINARY$ define --parent=0000:00:02.0 --jsonfile=/dev/stdin \ --uuid=d069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.argv b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.argv index eb7262035e..fc392f0c39 100644 --- a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.argv +++ b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ start -p 0000:00:02.0 --jsonfile /dev/stdin +$MDEVCTL_BINARY$ start --parent=0000:00:02.0 --jsonfile=/dev/stdin diff --git a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv index 773e98b963..8a40b1037b 100644 --- a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv +++ b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ define -p 0000:00:02.0 --jsonfile /dev/stdin +$MDEVCTL_BINARY$ define --parent=0000:00:02.0 --jsonfile=/dev/stdin diff --git a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.argv b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.argv index eb7262035e..fc392f0c39 100644 --- a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.argv +++ b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ start -p 0000:00:02.0 --jsonfile /dev/stdin +$MDEVCTL_BINARY$ start --parent=0000:00:02.0 --jsonfile=/dev/stdin diff --git a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv index 773e98b963..8a40b1037b 100644 --- a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv +++ b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ define -p 0000:00:02.0 --jsonfile /dev/stdin +$MDEVCTL_BINARY$ define --parent=0000:00:02.0 --jsonfile=/dev/stdin diff --git a/tests/nodedevmdevctldata/mdevctl-start.argv b/tests/nodedevmdevctldata/mdevctl-start.argv index dc0ae7be0e..dd92de8527 100644 --- a/tests/nodedevmdevctldata/mdevctl-start.argv +++ b/tests/nodedevmdevctldata/mdevctl-start.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ start -u d069d019-36ea-4111-8f0a-8c9a70e21366 +$MDEVCTL_BINARY$ start --uuid=d069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdevctl-stop.argv b/tests/nodedevmdevctldata/mdevctl-stop.argv index 5bdb213a32..7549b6ff74 100644 --- a/tests/nodedevmdevctldata/mdevctl-stop.argv +++ b/tests/nodedevmdevctldata/mdevctl-stop.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ stop -u d069d019-36ea-4111-8f0a-8c9a70e21366 +$MDEVCTL_BINARY$ stop --uuid=d069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdevctl-undefine.argv b/tests/nodedevmdevctldata/mdevctl-undefine.argv index c2236727ef..8d5217beba 100644 --- a/tests/nodedevmdevctldata/mdevctl-undefine.argv +++ b/tests/nodedevmdevctldata/mdevctl-undefine.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ undefine -u d069d019-36ea-4111-8f0a-8c9a70e21366 +$MDEVCTL_BINARY$ undefine --uuid=d069d019-36ea-4111-8f0a-8c9a70e21366 -- 2.26.3