mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
virsh: Add message to terminal when running snapshot-revert
When running virsh snapshot-* command, such as snapshot-create-as / snapshot-delete, it prints a result message. On the other hand virsh snapshot-revert command doesn't print a result message. So, This patch fixes to add message when running virsh snapshot-revert command. # virsh snapshot-create-as vm1 test1 Domain snapshot test01 created # virsh snapshot-revert vm1 test1 # virsh snapshot-delete vm1 test1 Domain snapshot test01 deleted Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e3b3a8bd95
commit
4b29d5c4f5
@ -100,11 +100,14 @@ Domain snapshot s1 created
|
|||||||
|
|
||||||
Domain snapshot s3 created
|
Domain snapshot s3 created
|
||||||
Domain snapshot s2 created
|
Domain snapshot s2 created
|
||||||
|
Domain snapshot s3 reverted
|
||||||
|
|
||||||
Domain snapshot s6 created
|
Domain snapshot s6 created
|
||||||
Domain snapshot s5 created
|
Domain snapshot s5 created
|
||||||
|
Domain snapshot s6 reverted
|
||||||
|
|
||||||
Domain snapshot s4 created
|
Domain snapshot s4 created
|
||||||
|
Domain snapshot s1 reverted
|
||||||
|
|
||||||
Domain snapshot s7 created
|
Domain snapshot s7 created
|
||||||
Domain snapshot s8 created
|
Domain snapshot s8 created
|
||||||
|
@ -1783,6 +1783,10 @@ cmdDomainSnapshotRevert(vshControl *ctl, const vshCmd *cmd)
|
|||||||
result = virDomainRevertToSnapshot(snapshot, flags);
|
result = virDomainRevertToSnapshot(snapshot, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result < 0)
|
||||||
|
vshError(ctl, _("Failed to revert snapshot %s"), name);
|
||||||
|
else
|
||||||
|
vshPrintExtra(ctl, _("Domain snapshot %s reverted\n"), name);
|
||||||
return result >= 0;
|
return result >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user