Cleanup useless flags specifications

After we switched to C99 initialization, I noticed there were many
places where the specification of .flags parameter differed.  After
going through many options and deciding whether to unify the
initialization to be '.flags = 0' or '.flags = VSH_OFLAG_NONE', I
realized both can be removed and it makes the code easier to go
through.
This commit is contained in:
Martin Kletzander 2013-03-12 16:35:30 +01:00
parent 66f1bbc350
commit 73cc87d161
11 changed files with 0 additions and 406 deletions

View File

@ -425,12 +425,10 @@ static const vshCmdOptDef opts_domblklist[] = {
},
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("get inactive rather than running configuration")
},
{.name = "details",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("additionally display the type and device value")
},
{.name = NULL}
@ -541,7 +539,6 @@ static const vshCmdOptDef opts_domiflist[] = {
},
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("get inactive rather than running configuration")
},
{.name = NULL}
@ -652,12 +649,10 @@ static const vshCmdOptDef opts_domif_getlink[] = {
},
{.name = "persistent",
.type = VSH_OT_ALIAS,
.flags = 0,
.help = "config"
},
{.name = "config",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("Get persistent interface state")
},
{.name = NULL}
@ -848,7 +843,6 @@ static const vshCmdOptDef opts_domblkstat[] = {
},
{.name = "human",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("print a more human readable output")
},
{.name = NULL}
@ -1311,7 +1305,6 @@ static const vshCmdOptDef opts_domstate[] = {
},
{.name = "reason",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("also print reason for the state")
},
{.name = NULL}
@ -1638,97 +1631,78 @@ cleanup:
static const vshCmdOptDef opts_list[] = {
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list inactive domains")
},
{.name = "all",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list inactive & active domains")
},
{.name = "transient",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list transient domains")
},
{.name = "persistent",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list persistent domains")
},
{.name = "with-snapshot",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains with existing snapshot")
},
{.name = "without-snapshot",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains without a snapshot")
},
{.name = "state-running",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains in running state")
},
{.name = "state-paused",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains in paused state")
},
{.name = "state-shutoff",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains in shutoff state")
},
{.name = "state-other",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains in other states")
},
{.name = "autostart",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains with autostart enabled")
},
{.name = "no-autostart",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains with autostart disabled")
},
{.name = "with-managed-save",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains with managed save state")
},
{.name = "without-managed-save",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domains without managed save")
},
{.name = "uuid",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list uuid's only")
},
{.name = "name",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list domain names only")
},
{.name = "table",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list table (default)")
},
{.name = "managed-save",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("mark inactive domains with managed save state")
},
{.name = "title",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("show short domain description")
},
{.name = NULL}

File diff suppressed because it is too large Load Diff

View File

@ -89,7 +89,6 @@ static const vshCmdOptDef opts_connect[] = {
},
{.name = "readonly",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("read-only connection")
},
{.name = NULL}
@ -145,12 +144,10 @@ static const vshCmdInfo info_freecell[] = {
static const vshCmdOptDef opts_freecell[] = {
{.name = "cellno",
.type = VSH_OT_INT,
.flags = 0,
.help = N_("NUMA cell number")
},
{.name = "all",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("show free memory for all NUMA cells")
},
{.name = NULL}
@ -358,12 +355,10 @@ static const vshCmdInfo info_nodecpustats[] = {
static const vshCmdOptDef opts_node_cpustats[] = {
{.name = "cpu",
.type = VSH_OT_INT,
.flags = 0,
.help = N_("prints specified cpu statistics only.")
},
{.name = "percent",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("prints by percentage during 1 second.")
},
{.name = NULL}
@ -495,7 +490,6 @@ static const vshCmdInfo info_nodememstats[] = {
static const vshCmdOptDef opts_node_memstats[] = {
{.name = "cell",
.type = VSH_OT_INT,
.flags = 0,
.help = N_("prints specified cell statistics only.")
},
{.name = NULL}
@ -718,7 +712,6 @@ static const vshCmdInfo info_version[] = {
static const vshCmdOptDef opts_version[] = {
{.name = "daemon",
.type = VSH_OT_BOOL,
.flags = VSH_OFLAG_NONE,
.help = N_("report daemon version too")
},
{.name = NULL}
@ -817,19 +810,16 @@ static const vshCmdInfo info_node_memory_tune[] = {
static const vshCmdOptDef opts_node_memory_tune[] = {
{.name = "shm-pages-to-scan",
.type = VSH_OT_INT,
.flags = VSH_OFLAG_NONE,
.help = N_("number of pages to scan before the shared memory service "
"goes to sleep")
},
{.name = "shm-sleep-millisecs",
.type = VSH_OT_INT,
.flags = VSH_OFLAG_NONE,
.help = N_("number of millisecs the shared memory service should "
"sleep before next scan")
},
{.name = "shm-merge-across-nodes",
.type = VSH_OT_INT,
.flags = VSH_OFLAG_NONE,
.help = N_("Specifies if pages from different numa nodes can be merged")
},
{.name = NULL}

View File

@ -325,12 +325,10 @@ static const vshCmdInfo info_interface_list[] = {
static const vshCmdOptDef opts_interface_list[] = {
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list inactive interfaces")
},
{.name = "all",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list inactive & active interfaces")
},
{.name = NULL}
@ -464,7 +462,6 @@ static const vshCmdOptDef opts_interface_dumpxml[] = {
},
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("show inactive defined XML")
},
{.name = NULL}
@ -791,17 +788,14 @@ static const vshCmdOptDef opts_interface_bridge[] = {
},
{.name = "no-stp",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("do not enable STP for this bridge")
},
{.name = "delay",
.type = VSH_OT_INT,
.flags = 0,
.help = N_("number of seconds to squelch traffic on newly connected ports")
},
{.name = "no-start",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("don't start the bridge immediately")
},
{.name = NULL}
@ -1025,7 +1019,6 @@ static const vshCmdOptDef opts_interface_unbridge[] = {
},
{.name = "no-start",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("don't start the un-slaved interface immediately (not recommended)")
},
{.name = NULL}

View File

@ -99,7 +99,6 @@ static const vshCmdOptDef opts_network_autostart[] = {
},
{.name = "disable",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("disable autostarting")
},
{.name = NULL}
@ -299,7 +298,6 @@ static const vshCmdOptDef opts_network_dumpxml[] = {
},
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = VSH_OFLAG_NONE,
.help = N_("network information of an inactive domain")
},
{.name = NULL}
@ -631,32 +629,26 @@ static const vshCmdInfo info_network_list[] = {
static const vshCmdOptDef opts_network_list[] = {
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list inactive networks")
},
{.name = "all",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list inactive & active networks")
},
{.name = "persistent",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list persistent networks")
},
{.name = "transient",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list transient networks")
},
{.name = "autostart",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list networks with autostart enabled")
},
{.name = "no-autostart",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list networks with autostart disabled")
},
{.name = NULL}
@ -881,22 +873,18 @@ static const vshCmdOptDef opts_network_update[] = {
},
{.name = "parent-index",
.type = VSH_OT_INT,
.flags = 0,
.help = N_("which parent object to search through")
},
{.name = "config",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("affect next network startup")
},
{.name = "live",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("affect running network")
},
{.name = "current",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("affect current state of network")
},
{.name = NULL}

View File

@ -110,7 +110,6 @@ static const vshCmdInfo info_node_device_destroy[] = {
static const vshCmdOptDef opts_node_device_destroy[] = {
{.name = "name",
.type = VSH_OT_ALIAS,
.flags = 0,
.help = "device"
},
{.name = "device",
@ -381,12 +380,10 @@ static const vshCmdInfo info_node_list_devices[] = {
static const vshCmdOptDef opts_node_list_devices[] = {
{.name = "tree",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list devices in a tree")
},
{.name = "cap",
.type = VSH_OT_STRING,
.flags = VSH_OFLAG_NONE,
.help = N_("capability names, separated by comma")
},
{.name = NULL}

View File

@ -95,7 +95,6 @@ static const vshCmdOptDef opts_pool_autostart[] = {
},
{.name = "disable",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("disable autostarting")
},
{.name = NULL}
@ -192,7 +191,6 @@ static const vshCmdOptDef opts_pool_X_as[] = {
},
{.name = "print-xml",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("print XML document, but don't define/create")
},
{.name = "type",
@ -202,32 +200,26 @@ static const vshCmdOptDef opts_pool_X_as[] = {
},
{.name = "source-host",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("source-host for underlying storage")
},
{.name = "source-path",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("source path for underlying storage")
},
{.name = "source-dev",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("source device for underlying storage")
},
{.name = "source-name",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("source name for underlying storage")
},
{.name = "target",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("target for underlying storage")
},
{.name = "source-format",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("format for underlying storage")
},
{.name = NULL}
@ -451,12 +443,10 @@ static const vshCmdOptDef opts_pool_build[] = {
},
{.name = "no-overwrite",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("do not overwrite an existing pool of this type")
},
{.name = "overwrite",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("overwrite any existing data")
},
{.name = NULL}
@ -643,7 +633,6 @@ static const vshCmdOptDef opts_pool_dumpxml[] = {
},
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("show inactive defined XML")
},
{.name = NULL}
@ -916,42 +905,34 @@ static const vshCmdInfo info_pool_list[] = {
static const vshCmdOptDef opts_pool_list[] = {
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list inactive pools")
},
{.name = "all",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list inactive & active pools")
},
{.name = "transient",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list transient pools")
},
{.name = "persistent",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list persistent pools")
},
{.name = "autostart",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list pools with autostart enabled")
},
{.name = "no-autostart",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list pools with autostart disabled")
},
{.name = "type",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("only list pool of specified type(s) (if supported)")
},
{.name = "details",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("display extended details for pools")
},
{.name = NULL}
@ -1375,17 +1356,14 @@ static const vshCmdOptDef opts_find_storage_pool_sources_as[] = {
},
{.name = "host",
.type = VSH_OT_DATA,
.flags = VSH_OFLAG_NONE,
.help = N_("optional host to query")
},
{.name = "port",
.type = VSH_OT_DATA,
.flags = VSH_OFLAG_NONE,
.help = N_("optional port to query")
},
{.name = "initiator",
.type = VSH_OT_DATA,
.flags = VSH_OFLAG_NONE,
.help = N_("optional initiator IQN to use for query")
},
{.name = NULL}
@ -1464,7 +1442,6 @@ static const vshCmdOptDef opts_find_storage_pool_sources[] = {
},
{.name = "srcSpec",
.type = VSH_OT_DATA,
.flags = VSH_OFLAG_NONE,
.help = N_("optional file of source xml to query for pools")
},
{.name = NULL}

View File

@ -487,22 +487,18 @@ static const vshCmdInfo info_secret_list[] = {
static const vshCmdOptDef opts_secret_list[] = {
{.name = "ephemeral",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list ephemeral secrets")
},
{.name = "no-ephemeral",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list non-ephemeral secrets")
},
{.name = "private",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list private secrets")
},
{.name = "no-private",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list non-private secrets")
},
{.name = NULL}

View File

@ -129,52 +129,42 @@ static const vshCmdOptDef opts_snapshot_create[] = {
},
{.name = "xmlfile",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("domain snapshot XML")
},
{.name = "redefine",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("redefine metadata for existing snapshot")
},
{.name = "current",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("with redefine, set current snapshot")
},
{.name = "no-metadata",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("take snapshot but create no metadata")
},
{.name = "halt",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("halt domain after snapshot is created")
},
{.name = "disk-only",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("capture disk state but not vm state")
},
{.name = "reuse-external",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("reuse any existing external files")
},
{.name = "quiesce",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("quiesce guest's file systems")
},
{.name = "atomic",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("require atomic operation")
},
{.name = "live",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("take a live snapshot")
},
{.name = NULL}
@ -348,52 +338,42 @@ static const vshCmdOptDef opts_snapshot_create_as[] = {
},
{.name = "name",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("name of snapshot")
},
{.name = "description",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("description of snapshot")
},
{.name = "print-xml",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("print XML document rather than create")
},
{.name = "no-metadata",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("take snapshot but create no metadata")
},
{.name = "halt",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("halt domain after snapshot is created")
},
{.name = "disk-only",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("capture disk state but not vm state")
},
{.name = "reuse-external",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("reuse any existing external files")
},
{.name = "quiesce",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("quiesce guest's file systems")
},
{.name = "atomic",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("require atomic operation")
},
{.name = "live",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("take a live snapshot")
},
{.name = "memspec",
@ -403,7 +383,6 @@ static const vshCmdOptDef opts_snapshot_create_as[] = {
},
{.name = "diskspec",
.type = VSH_OT_ARGV,
.flags = 0,
.help = N_("disk attributes: disk[,snapshot=type][,driver=type][,file=name]")
},
{.name = NULL}
@ -551,22 +530,18 @@ static const vshCmdOptDef opts_snapshot_edit[] = {
},
{.name = "snapshotname",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("snapshot name")
},
{.name = "current",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("also set edited snapshot as current")
},
{.name = "rename",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("allow renaming an existing snapshot")
},
{.name = "clone",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("allow cloning to new name")
},
{.name = NULL}
@ -683,17 +658,14 @@ static const vshCmdOptDef opts_snapshot_current[] = {
},
{.name = "name",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list the name, rather than the full xml")
},
{.name = "security-info",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("include security sensitive information in XML dump")
},
{.name = "snapshotname",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("name of existing snapshot to make current")
},
{.name = NULL}
@ -926,12 +898,10 @@ static const vshCmdOptDef opts_snapshot_info[] = {
},
{.name = "snapshotname",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("snapshot name")
},
{.name = "current",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("info on current snapshot")
},
{.name = NULL}
@ -1485,82 +1455,66 @@ static const vshCmdOptDef opts_snapshot_list[] = {
},
{.name = "parent",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("add a column showing parent snapshot")
},
{.name = "roots",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list only snapshots without parents")
},
{.name = "leaves",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list only snapshots without children")
},
{.name = "no-leaves",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list only snapshots that are not leaves (with children)")
},
{.name = "metadata",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list only snapshots that have metadata that would prevent undefine")
},
{.name = "no-metadata",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list only snapshots that have no metadata managed by libvirt")
},
{.name = "inactive",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("filter by snapshots taken while inactive")
},
{.name = "active",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("filter by snapshots taken while active (system checkpoints)")
},
{.name = "disk-only",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("filter by disk-only snapshots")
},
{.name = "internal",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("filter by internal snapshots")
},
{.name = "external",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("filter by external snapshots")
},
{.name = "tree",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list snapshots in a tree")
},
{.name = "from",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("limit list to children of given snapshot")
},
{.name = "current",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("limit list to children of current snapshot")
},
{.name = "descendants",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("with --from, list all descendants")
},
{.name = "name",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("list snapshot names only")
},
@ -1800,7 +1754,6 @@ static const vshCmdOptDef opts_snapshot_dumpxml[] = {
},
{.name = "security-info",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("include security sensitive information in XML dump")
},
{.name = NULL}
@ -1864,12 +1817,10 @@ static const vshCmdOptDef opts_snapshot_parent[] = {
},
{.name = "snapshotname",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("find parent of snapshot name")
},
{.name = "current",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("find parent of current snapshot")
},
{.name = NULL}
@ -1934,27 +1885,22 @@ static const vshCmdOptDef opts_snapshot_revert[] = {
},
{.name = "snapshotname",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("snapshot name")
},
{.name = "current",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("revert to current snapshot")
},
{.name = "running",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("after reverting, change state to running")
},
{.name = "paused",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("after reverting, change state to paused")
},
{.name = "force",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("try harder on risky reverts")
},
{.name = NULL}
@ -2032,27 +1978,22 @@ static const vshCmdOptDef opts_snapshot_delete[] = {
},
{.name = "snapshotname",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("snapshot name")
},
{.name = "current",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("delete current snapshot")
},
{.name = "children",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("delete snapshot and all children")
},
{.name = "children-only",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("delete children but not snapshot")
},
{.name = "metadata",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("delete only libvirt metadata, leaving snapshot contents behind")
},
{.name = NULL}

View File

@ -132,27 +132,22 @@ static const vshCmdOptDef opts_vol_create_as[] = {
},
{.name = "allocation",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("initial allocation size, as scaled integer (default bytes)")
},
{.name = "format",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("file format type raw,bochs,qcow,qcow2,qed,vmdk")
},
{.name = "backing-vol",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("the backing volume if taking a snapshot")
},
{.name = "backing-vol-format",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("format of backing volume if taking a snapshot")
},
{.name = "prealloc-metadata",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("preallocate metadata (for qcow2 instead of full allocation)")
},
{.name = NULL}
@ -332,7 +327,6 @@ static const vshCmdOptDef opts_vol_create[] = {
},
{.name = "prealloc-metadata",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("preallocate metadata (for qcow2 instead of full allocation)")
},
{.name = NULL}
@ -408,12 +402,10 @@ static const vshCmdOptDef opts_vol_create_from[] = {
},
{.name = "inputpool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid of the input volume's pool")
},
{.name = "prealloc-metadata",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("preallocate metadata (for qcow2 instead of full allocation)")
},
{.name = NULL}
@ -523,12 +515,10 @@ static const vshCmdOptDef opts_vol_clone[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = "prealloc-metadata",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("preallocate metadata (for qcow2 instead of full allocation)")
},
{.name = NULL}
@ -621,17 +611,14 @@ static const vshCmdOptDef opts_vol_upload[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = "offset",
.type = VSH_OT_INT,
.flags = 0,
.help = N_("volume offset to upload to")
},
{.name = "length",
.type = VSH_OT_INT,
.flags = 0,
.help = N_("amount of data to upload")
},
{.name = NULL}
@ -738,17 +725,14 @@ static const vshCmdOptDef opts_vol_download[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = "offset",
.type = VSH_OT_INT,
.flags = 0,
.help = N_("volume offset to download from")
},
{.name = "length",
.type = VSH_OT_INT,
.flags = 0,
.help = N_("amount of data to download")
},
{.name = NULL}
@ -848,7 +832,6 @@ static const vshCmdOptDef opts_vol_delete[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = NULL}
@ -897,12 +880,10 @@ static const vshCmdOptDef opts_vol_wipe[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = "algorithm",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("perform selected wiping algorithm")
},
{.name = NULL}
@ -975,7 +956,6 @@ static const vshCmdOptDef opts_vol_info[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = NULL}
@ -1056,22 +1036,18 @@ static const vshCmdOptDef opts_vol_resize[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = "allocate",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("allocate the new capacity, rather than leaving it sparse")
},
{.name = "delta",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("use capacity as a delta to current size, rather than the new size")
},
{.name = "shrink",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("allow the resize to shrink the volume")
},
{.name = NULL}
@ -1158,7 +1134,6 @@ static const vshCmdOptDef opts_vol_dumpxml[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = NULL}
@ -1332,7 +1307,6 @@ static const vshCmdOptDef opts_vol_list[] = {
},
{.name = "details",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("display extended details for volumes")
},
{.name = NULL}
@ -1644,7 +1618,6 @@ static const vshCmdInfo info_vol_pool[] = {
static const vshCmdOptDef opts_vol_pool[] = {
{.name = "uuid",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("return the pool uuid rather than pool name")
},
{.name = "vol",
@ -1713,7 +1686,6 @@ static const vshCmdOptDef opts_vol_key[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = NULL}
@ -1753,7 +1725,6 @@ static const vshCmdOptDef opts_vol_path[] = {
},
{.name = "pool",
.type = VSH_OT_STRING,
.flags = 0,
.help = N_("pool name or uuid")
},
{.name = NULL}

View File

@ -453,7 +453,6 @@ static const vshCmdInfo info_help[] = {
static const vshCmdOptDef opts_help[] = {
{.name = "command",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("Prints global help, command specific help, or help for a group of related commands")
},
{.name = NULL}
@ -717,7 +716,6 @@ static const vshCmdInfo info_cd[] = {
static const vshCmdOptDef opts_cd[] = {
{.name = "dir",
.type = VSH_OT_DATA,
.flags = 0,
.help = N_("directory to switch to (default: home or else root)")
},
{.name = NULL}
@ -801,22 +799,18 @@ static const vshCmdInfo info_echo[] = {
static const vshCmdOptDef opts_echo[] = {
{.name = "shell",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("escape for shell use")
},
{.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}
@ -975,7 +969,6 @@ vshCmddefOptParse(const vshCmdDef *cmd, uint32_t *opts_need_arg,
static vshCmdOptDef helpopt = {
.name = "help",
.type = VSH_OT_BOOL,
.flags = 0,
.help = N_("print help for this function")
};
static const vshCmdOptDef *