From 1c9968a2b15b1fc8a8447b92bf0d9ea04b09e615 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 8 Dec 2008 13:22:44 +0000 Subject: [PATCH] virsh.c: tweak options to produce more accurate help * src/virsh.c: Adjust some vshCmdOptDef command option flags to improve auto-generated help command syntax. --- ChangeLog | 4 ++++ src/virsh.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f66e40738d..0d7e806fd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ Mon Dec 8 13:22:06 +0100 2008 Jim Meyering + virsh.c: tweak options to produce more accurate help + * src/virsh.c: Adjust some vshCmdOptDef command option flags + to improve auto-generated help command syntax. + virsh.c: remove all "syntax" vshCmdInfo entries. * src/virsh.c: ... now that info is generated. diff --git a/src/virsh.c b/src/virsh.c index 230a128eec..bb81f25bd0 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -1008,7 +1008,7 @@ static const vshCmdInfo info_start[] = { }; static const vshCmdOptDef opts_start[] = { - {"name", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("name of the inactive domain")}, + {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("name of the inactive domain")}, {NULL, 0, 0, NULL} }; @@ -3680,7 +3680,7 @@ static const vshCmdInfo info_pool_start[] = { }; static const vshCmdOptDef opts_pool_start[] = { - {"name", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("name of the inactive pool")}, + {"pool", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("name of the inactive pool")}, {NULL, 0, 0, NULL} }; @@ -3721,8 +3721,8 @@ static const vshCmdOptDef opts_vol_create_as[] = { {"pool", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("pool name")}, {"name", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("name of the volume")}, {"capacity", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("size of the vol with optional k,M,G,T suffix")}, - {"allocation", VSH_OT_DATA, 0, gettext_noop("initial allocation size with optional k,M,G,T suffix")}, - {"format", VSH_OT_DATA, 0, gettext_noop("file format type raw,bochs,qcow,qcow2,vmdk")}, + {"allocation", VSH_OT_STRING, 0, gettext_noop("initial allocation size with optional k,M,G,T suffix")}, + {"format", VSH_OT_STRING, 0, gettext_noop("file format type raw,bochs,qcow,qcow2,vmdk")}, {NULL, 0, 0, NULL} }; @@ -4881,7 +4881,7 @@ static const vshCmdInfo info_detach_interface[] = { static const vshCmdOptDef opts_detach_interface[] = { {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("domain name, id or uuid")}, {"type", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("network interface type")}, - {"mac", VSH_OT_DATA, 0, gettext_noop("MAC address")}, + {"mac", VSH_OT_STRING, 0, gettext_noop("MAC address")}, {NULL, 0, 0, NULL} }; @@ -5002,10 +5002,10 @@ static const vshCmdOptDef opts_attach_disk[] = { {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("domain name, id or uuid")}, {"source", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("source of disk device")}, {"target", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("target of disk device")}, - {"driver", VSH_OT_DATA, 0, gettext_noop("driver of disk device")}, - {"subdriver", VSH_OT_DATA, 0, gettext_noop("subdriver of disk device")}, - {"type", VSH_OT_DATA, 0, gettext_noop("target device type")}, - {"mode", VSH_OT_DATA, 0, gettext_noop("mode of device reading and writing")}, + {"driver", VSH_OT_STRING, 0, gettext_noop("driver of disk device")}, + {"subdriver", VSH_OT_STRING, 0, gettext_noop("subdriver of disk device")}, + {"type", VSH_OT_STRING, 0, gettext_noop("target device type")}, + {"mode", VSH_OT_STRING, 0, gettext_noop("mode of device reading and writing")}, {NULL, 0, 0, NULL} };