On 10/18/2016 07:33 PM, Peter Krempa wrote:
On Tue, Oct 18, 2016 at 07:39:16 -0400, Kothapally Madhu Pavan wrote:
Correcting the error reporting method by using vshError
instead of virReportError

Signed-off-by: Kothapally Madhu Pavan <k...@linux.vnet.ibm.com>
---
  tools/virsh-domain.c |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 050e7fb..c9fabf2 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10475,9 +10475,9 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
if (vshCommandOptBool(cmd, "postcopy-after-precopy")) {
          if (!vshCommandOptBool(cmd, "postcopy")) {
-            virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
-                          _("--postcopy-after-precopy can only be used with "
-                            "--postcopy"));
+            vshError(ctl, "%s",
+                     _("argument unsupported: --postcopy-after-precopy can only 
"
+                       "be used with --postcopy"));
              goto cleanup;
I think the above code can be avoided by simply using
VSH_REQUIRE_OPTION.
Yes, it can be avoided by using VSH_REQUIRE_OPTION. Sending a new patch.

Thanks,
Madhu Pavan.

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

Reply via email to