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

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



On 10/19/2010 10:40 AM, Eric Blake wrote:
* 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.
---

@@ -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}

Self-NAK - this causes 'make check; to fail:

+++ out	2010-10-19 10:52:26.575490946 -0600
@@ -1,2 +1 @@
-error: vcpupin: Invalid or missing vCPU number.
-
+error: unexpected data '0,1'

That is, $abs_top_builddir/tools/virsh --connect test:///default vcpupin test a 0,1 > out 2>&1

gives worse error output than before.  v2 coming up.

--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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