Skip to content

Commit 1fd79d4

Browse files
committed
rbd: don't print "image will expire at" message when trash_move() fails
Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 4e368a9 commit 1fd79d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/rbd/action/Trash.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,13 @@ int execute_move(const po::variables_map &vm,
9999
if (r < 0) {
100100
std::cerr << "rbd: deferred delete error: " << cpp_strerror(r)
101101
<< std::endl;
102+
return r;
102103
}
103104

104105
if (expires_at != "now") {
105106
std::cout << "rbd: image " << image_name << " will expire at " << exp_time << std::endl;
106107
}
107-
return r;
108+
return 0;
108109
}
109110

110111
void get_remove_arguments(po::options_description *positional,

0 commit comments

Comments
 (0)