zfs: rollback: improve error message

we don't even know whether $snap exists at all, so the old variant could
be rather misleading..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2020-09-22 08:56:13 +02:00
committed by Thomas Lamprecht
parent c8eb017867
commit d0eaf18571

View File

@ -476,9 +476,8 @@ sub volume_rollback_is_possible {
die "can't rollback, no snapshots exist at all\n"
if !defined($recentsnap);
if ($snap ne $recentsnap) {
die "can't rollback, more recent snapshots exist\n";
}
die "can't rollback, '$snap' is not most recent snapshot\n"
if $snap ne $recentsnap;
return 1;
}