Without this check, 'rbd mv foo' crashed trying to use a NULL char* as
a string.
Reported-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
if (opt_cmd == OPT_EXPORT && !path)
path = imgname;
- if ((opt_cmd == OPT_COPY || opt_cmd == OPT_CLONE) && !destname ) {
+ if ((opt_cmd == OPT_COPY || opt_cmd == OPT_CLONE || opt_cmd == OPT_RENAME) &&
+ !destname ) {
cerr << "rbd: destination image name was not specified" << std::endl;
return EXIT_FAILURE;
}