Re: [libvirt] [PATCH v2] vsh: Using VSH_REQUIRE_OPTION rather than virReportError

2016-10-28 Thread John Ferlan


On 10/18/2016 01:33 PM, Kothapally Madhu Pavan wrote:
> Correcting the error reporting method by using VSH_REQUIRE_OPTION
> instead of virReportError
> 
> Signed-off-by: Kothapally Madhu Pavan 
> ---
>  tools/virsh-domain.c |7 +--
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 

ACK (and pushed)

Tks -

John

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


[libvirt] [PATCH v2] vsh: Using VSH_REQUIRE_OPTION rather than virReportError

2016-10-18 Thread Kothapally Madhu Pavan
Correcting the error reporting method by using VSH_REQUIRE_OPTION
instead of virReportError

Signed-off-by: Kothapally Madhu Pavan 
---
 tools/virsh-domain.c |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 050e7fb..e1cb2ac 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10443,6 +10443,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
 
 VSH_EXCLUSIVE_OPTIONS("live", "offline");
 VSH_EXCLUSIVE_OPTIONS("timeout-suspend", "timeout-postcopy");
+VSH_REQUIRE_OPTION("postcopy-after-precopy", "postcopy");
 
 if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
 return false;
@@ -10474,12 +10475,6 @@ 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"));
-goto cleanup;
-}
 iterEvent = virConnectDomainEventRegisterAny(
 priv->conn, dom,
 VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION,

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