mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
virsh.c: Switch to C99 initialization of vshCmdOptDef
This commit is contained in:
parent
5d9815b657
commit
0f6c46c3d7
@ -448,8 +448,12 @@ static const vshCmdInfo info_help[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const vshCmdOptDef opts_help[] = {
|
static const vshCmdOptDef opts_help[] = {
|
||||||
{"command", VSH_OT_DATA, 0, N_("Prints global help, command specific help, or help for a group of related commands")},
|
{.name = "command",
|
||||||
{NULL, 0, 0, NULL}
|
.type = VSH_OT_DATA,
|
||||||
|
.flags = 0,
|
||||||
|
.help = N_("Prints global help, command specific help, or help for a group of related commands")
|
||||||
|
},
|
||||||
|
{.name = NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
@ -704,8 +708,12 @@ static const vshCmdInfo info_cd[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const vshCmdOptDef opts_cd[] = {
|
static const vshCmdOptDef opts_cd[] = {
|
||||||
{"dir", VSH_OT_DATA, 0, N_("directory to switch to (default: home or else root)")},
|
{.name = "dir",
|
||||||
{NULL, 0, 0, NULL}
|
.type = VSH_OT_DATA,
|
||||||
|
.flags = 0,
|
||||||
|
.help = N_("directory to switch to (default: home or else root)")
|
||||||
|
},
|
||||||
|
{.name = NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
@ -776,11 +784,27 @@ static const vshCmdInfo info_echo[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const vshCmdOptDef opts_echo[] = {
|
static const vshCmdOptDef opts_echo[] = {
|
||||||
{"shell", VSH_OT_BOOL, 0, N_("escape for shell use")},
|
{.name = "shell",
|
||||||
{"xml", VSH_OT_BOOL, 0, N_("escape for XML use")},
|
.type = VSH_OT_BOOL,
|
||||||
{"str", VSH_OT_ALIAS, 0, "string"},
|
.flags = 0,
|
||||||
{"string", VSH_OT_ARGV, 0, N_("arguments to echo")},
|
.help = N_("escape for shell use")
|
||||||
{NULL, 0, 0, NULL}
|
},
|
||||||
|
{.name = "xml",
|
||||||
|
.type = VSH_OT_BOOL,
|
||||||
|
.flags = 0,
|
||||||
|
.help = N_("escape for XML use")
|
||||||
|
},
|
||||||
|
{.name = "str",
|
||||||
|
.type = VSH_OT_ALIAS,
|
||||||
|
.flags = 0,
|
||||||
|
.help = "string"
|
||||||
|
},
|
||||||
|
{.name = "string",
|
||||||
|
.type = VSH_OT_ARGV,
|
||||||
|
.flags = 0,
|
||||||
|
.help = N_("arguments to echo")
|
||||||
|
},
|
||||||
|
{.name = NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Exists mainly for debugging virsh, but also handy for adding back
|
/* Exists mainly for debugging virsh, but also handy for adding back
|
||||||
@ -929,8 +953,12 @@ vshCmddefOptParse(const vshCmdDef *cmd, uint32_t *opts_need_arg,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static vshCmdOptDef helpopt = {"help", VSH_OT_BOOL, 0,
|
static vshCmdOptDef helpopt = {
|
||||||
N_("print help for this function")};
|
.name = "help",
|
||||||
|
.type = VSH_OT_BOOL,
|
||||||
|
.flags = 0,
|
||||||
|
.help = N_("print help for this function")
|
||||||
|
};
|
||||||
static const vshCmdOptDef *
|
static const vshCmdOptDef *
|
||||||
vshCmddefGetOption(vshControl *ctl, const vshCmdDef *cmd, const char *name,
|
vshCmddefGetOption(vshControl *ctl, const vshCmdDef *cmd, const char *name,
|
||||||
uint32_t *opts_seen, int *opt_index)
|
uint32_t *opts_seen, int *opt_index)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user