Fixes: #2370
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
Copies the content of a src\-image into the newly created dest\-image.
.TP
.B \fBmv\fP [\fIsrc\-image\fP] [\fIdest\-image\fP]
-Renames an image.
+Renames an image. Note: rename across pools is unsupported.
.TP
.B \fBsnap\fP ls [\fIimage\-name\fP]
Dumps the list of snapshots inside a specific image.
usage_exit();
}
+ if ((opt_cmd == OPT_RENAME) && (strcmp(poolname, dest_poolname) != 0)) {
+ cerr << "error: mv/rename across pools not supported" << std::endl;
+ cerr << "source pool: " << poolname << " dest pool: " << dest_poolname
+ << std::endl;
+ exit(EXIT_FAILURE);
+ }
+
bool talk_to_cluster = (opt_cmd != OPT_MAP &&
opt_cmd != OPT_UNMAP &&
opt_cmd != OPT_SHOWMAPPED);