nodedev: Switch to using long options for mdevctl

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@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
Jonathon Jongsma 2021-04-08 16:53:27 -05:00
parent 963888f288
commit 123ea7d51c
10 changed files with 24 additions and 34 deletions

View File

@ -735,10 +735,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);
@ -902,11 +901,8 @@ nodeDeviceCreateXML(virConnectPtr conn,
virCommand *
nodeDeviceGetMdevctlStopCommand(const char *uuid, char **errmsg)
{
virCommand *cmd = virCommandNewArgList(MDEVCTL,
"stop",
"-u",
uuid,
NULL);
virCommand *cmd = virCommandNewArgList(MDEVCTL, "stop", NULL);
virCommandAddArgPair(cmd, "--uuid", uuid);
virCommandSetErrorBuffer(cmd, errmsg);
return cmd;
@ -915,11 +911,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;
}
@ -927,11 +920,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;
}

View File

@ -1,5 +1,5 @@
mdevctl \
start \
-p 0000:00:02.0 \
--jsonfile /dev/stdin \
--parent=0000:00:02.0 \
--jsonfile=/dev/stdin \
--uuid=d069d019-36ea-4111-8f0a-8c9a70e21366

View File

@ -1,5 +1,5 @@
mdevctl \
define \
-p 0000:00:02.0 \
--jsonfile /dev/stdin \
--parent=0000:00:02.0 \
--jsonfile=/dev/stdin \
--uuid=d069d019-36ea-4111-8f0a-8c9a70e21366

View File

@ -1,4 +1,4 @@
mdevctl \
start \
-p 0000:00:02.0 \
--jsonfile /dev/stdin
--parent=0000:00:02.0 \
--jsonfile=/dev/stdin

View File

@ -1,4 +1,4 @@
mdevctl \
define \
-p 0000:00:02.0 \
--jsonfile /dev/stdin
--parent=0000:00:02.0 \
--jsonfile=/dev/stdin

View File

@ -1,4 +1,4 @@
mdevctl \
start \
-p 0000:00:02.0 \
--jsonfile /dev/stdin
--parent=0000:00:02.0 \
--jsonfile=/dev/stdin

View File

@ -1,4 +1,4 @@
mdevctl \
define \
-p 0000:00:02.0 \
--jsonfile /dev/stdin
--parent=0000:00:02.0 \
--jsonfile=/dev/stdin

View File

@ -1,3 +1,3 @@
mdevctl \
start \
-u d069d019-36ea-4111-8f0a-8c9a70e21366
--uuid=d069d019-36ea-4111-8f0a-8c9a70e21366

View File

@ -1,3 +1,3 @@
mdevctl \
stop \
-u d069d019-36ea-4111-8f0a-8c9a70e21366
--uuid=d069d019-36ea-4111-8f0a-8c9a70e21366

View File

@ -1,3 +1,3 @@
mdevctl \
undefine \
-u d069d019-36ea-4111-8f0a-8c9a70e21366
--uuid=d069d019-36ea-4111-8f0a-8c9a70e21366