[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] virsh: improve help text where integers are expected



* tools/virsh.c (opts_freecell, opts_memtune, opts_vcpupin)
(opts_setvcpus, opts_setmaxmem, opts_setmem)
(opts_migrate_setmaxdowntime): Use VSH_OT_INT when only an integer
is expected.
---

I've pushed the virsh.pod cleanup.

>> Also, should memtune be changed to use VSH_OT_INT rather than
>> VSH_OT_STRING?  The current 'virsh help memtune' output looks
>> weird:
>  hum, probably, yes :-)

Is this okay to push?

 tools/virsh.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 0d078b0..cd4485f 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2247,7 +2247,7 @@ static const vshCmdInfo info_freecell[] = {
 };

 static const vshCmdOptDef opts_freecell[] = {
-    {"cellno", VSH_OT_DATA, 0, N_("NUMA cell number")},
+    {"cellno", VSH_OT_INT, 0, N_("NUMA cell number")},
     {NULL, 0, 0, NULL}
 };

@@ -2583,7 +2583,7 @@ static const vshCmdInfo info_vcpupin[] = {

 static const vshCmdOptDef opts_vcpupin[] = {
     {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
-    {"vcpu", VSH_OT_DATA, VSH_OFLAG_REQ, N_("vcpu number")},
+    {"vcpu", VSH_OT_INT, VSH_OFLAG_REQ, N_("vcpu number")},
     {"cpulist", VSH_OT_DATA, VSH_OFLAG_REQ, N_("host cpu number(s) (comma separated)")},
     {NULL, 0, 0, NULL}
 };
@@ -2719,7 +2719,7 @@ static const vshCmdInfo info_setvcpus[] = {

 static const vshCmdOptDef opts_setvcpus[] = {
     {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
-    {"count", VSH_OT_DATA, VSH_OFLAG_REQ, N_("number of virtual CPUs")},
+    {"count", VSH_OT_INT, VSH_OFLAG_REQ, N_("number of virtual CPUs")},
     {"maximum", VSH_OT_BOOL, 0, N_("set maximum limit on next boot")},
     {"config", VSH_OT_BOOL, 0, N_("affect next boot")},
     {"live", VSH_OT_BOOL, 0, N_("affect running domain")},
@@ -2772,7 +2772,7 @@ static const vshCmdInfo info_setmem[] = {

 static const vshCmdOptDef opts_setmem[] = {
     {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
-    {"kilobytes", VSH_OT_DATA, VSH_OFLAG_REQ, N_("number of kilobytes of memory")},
+    {"kilobytes", VSH_OT_INT, VSH_OFLAG_REQ, N_("number of kilobytes of memory")},
     {NULL, 0, 0, NULL}
 };

@@ -2829,7 +2829,7 @@ static const vshCmdInfo info_setmaxmem[] = {

 static const vshCmdOptDef opts_setmaxmem[] = {
     {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
-    {"kilobytes", VSH_OT_DATA, VSH_OFLAG_REQ, N_("maximum memory limit in kilobytes")},
+    {"kilobytes", VSH_OT_INT, VSH_OFLAG_REQ, N_("maximum memory limit in kilobytes")},
     {NULL, 0, 0, NULL}
 };

@@ -3453,7 +3453,7 @@ static const vshCmdInfo info_migrate_setmaxdowntime[] = {

 static const vshCmdOptDef opts_migrate_setmaxdowntime[] = {
     {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
-    {"downtime", VSH_OT_DATA, VSH_OFLAG_REQ, N_("maximum tolerable downtime (in milliseconds) for migration")},
+    {"downtime", VSH_OT_INT, VSH_OFLAG_REQ, N_("maximum tolerable downtime (in milliseconds) for migration")},
     {NULL, 0, 0, NULL}
 };

-- 
1.7.2.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]