diff options
author | Kevin Wolf <kwolf@redhat.com> | 2012-05-11 18:16:54 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-06-15 14:03:42 +0200 |
commit | ccf34716eeda0e3ad203c8a28f01efb412c56763 (patch) | |
tree | 46bb74acbf67d23a8586b1ce099cce15db363fc7 /qemu-img.c | |
parent | 4534ff5426afeeae5238ba10a696cafa9a0168ee (diff) | |
download | hqemu-ccf34716eeda0e3ad203c8a28f01efb412c56763.zip hqemu-ccf34716eeda0e3ad203c8a28f01efb412c56763.tar.gz |
qemu-img check: Print fixed clusters and recheck
When any inconsistencies have been fixed, print the statistics and run
another check to make sure everything is correct now.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -425,6 +425,16 @@ static int img_check(int argc, char **argv) return 1; } + if (result.corruptions_fixed || result.leaks_fixed) { + printf("The following inconsistencies were found and repaired:\n\n" + " %d leaked clusters\n" + " %d corruptions\n\n" + "Double checking the fixed image now...\n", + result.leaks_fixed, + result.corruptions_fixed); + ret = bdrv_check(bs, &result, 0); + } + if (!(result.corruptions || result.leaks || result.check_errors)) { printf("No errors were found on the image.\n"); } else { |