CID 743398 (#1 of 1): Unchecked return value (CHECKED_RETURN)
check_return: Calling function "FileStore::mount()" without
checking return value (as is done elsewhere 4 out of 5 times).
unchecked_value: No check of the return value of "fs.FileStore::mount()"
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
FileStore fs(vm["filestore-path"].as<string>(),
vm["journal-path"].as<string>());
- fs.mkfs();
- fs.mount();
+
+ if (fs.mkfs() < 0) {
+ cout << "mkfs failed" << std::endl;
+ return 1;
+ }
+
+ if (fs.mount() < 0) {
+ cout << "mount failed" << std::endl;
+ return 1;
+ }
ostream *detailed_ops = 0;
ofstream myfile;