Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbd: remove unused condition #12723

Merged
merged 1 commit into from Jan 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/tools/rbd/action/Group.cc
Expand Up @@ -261,11 +261,13 @@ int execute_list_images(const po::variables_map &vm) {

if (r == -ENOENT)
r = 0;

if (r < 0)
return r;

if (f)
f->open_array_section("consistency_groups");

for (auto i : images) {
std::string image_name = i.name;
int64_t pool_id = i.pool;
Expand All @@ -274,15 +276,14 @@ int execute_list_images(const po::variables_map &vm) {
if (cls::rbd::GROUP_IMAGE_LINK_STATE_INCOMPLETE == state) {
state_string = "incomplete";
}
if (r < 0)
return r;
if (f) {
f->dump_string("image name", image_name);
f->dump_int("pool id", pool_id);
f->dump_int("state", state);
} else
std::cout << pool_id << "." << image_name << " " << state_string << std::endl;
}

if (f) {
f->close_section();
f->flush(std::cout);
Expand Down