mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: Create macro for common "file" option
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. The macro will take a single argument _helpstr for the less common help string for each command option. Note that only file options using "OT_DATA" and "OFLAG_REQ" will be replace - others are left as is. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
@@ -142,11 +142,7 @@ static const vshCmdInfo info_network_create[] = {
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_create[] = {
|
||||
{.name = "file",
|
||||
.type = VSH_OT_DATA,
|
||||
.flags = VSH_OFLAG_REQ,
|
||||
.help = N_("file containing an XML network description")
|
||||
},
|
||||
VIRSH_COMMON_OPT_FILE(N_("file containing an XML network description")),
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
@@ -194,11 +190,7 @@ static const vshCmdInfo info_network_define[] = {
|
||||
};
|
||||
|
||||
static const vshCmdOptDef opts_network_define[] = {
|
||||
{.name = "file",
|
||||
.type = VSH_OT_DATA,
|
||||
.flags = VSH_OFLAG_REQ,
|
||||
.help = N_("file containing an XML network description")
|
||||
},
|
||||
VIRSH_COMMON_OPT_FILE(N_("file containing an XML network description")),
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user