os/bluestore_tool: handle fsck's returned status properly.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
This commit is contained in:
Igor Fedotov 2018-07-02 20:10:49 +03:00
parent 3befd56ec7
commit c39a2d19ce

View File

@ -329,8 +329,12 @@ int main(int argc, char **argv)
if (r < 0) {
cerr << "error from fsck: " << cpp_strerror(r) << std::endl;
exit(EXIT_FAILURE);
} else if (r > 0) {
cerr << action << " found " << r << " error(s)" << std::endl;
exit(EXIT_FAILURE);
} else {
cout << action << " success" << std::endl;
}
cout << action << " success" << std::endl;
}
else if (action == "prime-osd-dir") {
bluestore_bdev_label_t label;