提交 01193545 编写于 作者: K Kothapally Madhu Pavan 提交者: John Ferlan

vsh: Using VSH_REQUIRE_OPTION rather than virReportError

Correcting the error reporting method by using VSH_REQUIRE_OPTION
instead of virReportError
Signed-off-by: NKothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
上级 bbb333e4
......@@ -10419,6 +10419,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;
......@@ -10450,12 +10451,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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册