Merge branch 'heinz-changes' of github.com:jthornber/thin-provisioning-tools into rhel6.3-maintenance

This commit is contained in:
Joe Thornber 2012-03-13 14:06:21 +00:00
commit 21405ab76f
2 changed files with 3 additions and 3 deletions

View File

@ -65,8 +65,8 @@ namespace {
if (r)
throw runtime_error("Couldn't stat dev path");
if (S_ISREG(info.st_mode))
nr_blocks = div_down<block_address>(info.st_size, MD_BLOCK_SIZE);
if (S_ISREG(info.st_mode) && info.st_size)
nr_blocks = div_up<block_address>(info.st_size, MD_BLOCK_SIZE);
else if (S_ISBLK(info.st_mode)) {
// To get the size of a block device we need to

View File

@ -41,7 +41,7 @@ namespace {
}
} catch (std::exception &e) {
if (!quiet)
cerr << e.what();
cerr << e.what() << endl;
return 1;
}