We use negative error codes everywhere else, should
use them here too. Also add a couple of strategically
placed prints.
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit
8e5594da29e782b6efd046ed03f313599dafa1c5)
Conflicts:
src/tools/RadosDump.cc (Excluded, not in Hammer)
if (ret)
return ret;
if (type != TYPE_PG_BEGIN) {
+ cerr << "Invalid first section type " << type << std::endl;
return -EFAULT;
}
cerr << "do_import threw exception error " << e.what() << std::endl;
ret = -EFAULT;
}
- if (ret == EFAULT) {
+ if (ret == -EFAULT) {
cerr << "Corrupt input for import" << std::endl;
}
if (ret == 0)