mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
vsh: Using VSH_REQUIRE_OPTION rather than virReportError
Correcting the error reporting method by using VSH_REQUIRE_OPTION instead of virReportError Signed-off-by: Kothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
This commit is contained in:
parent
bbb333e481
commit
011935457a
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user