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

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

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]