Commit 14899cdf3a6e1fc0d72097a43c1c53a1354fbfbf
Committed by
Anthony Liguori
1 parent
bf011293
Fix QCOW2 debugging code to compile again
Updated to use C99 comments. Signed-off-by: Filip Navara <filip.navara@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
3 changed files
with
8 additions
and
8 deletions
block/qcow2-snapshot.c
@@ -288,7 +288,7 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info) | @@ -288,7 +288,7 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info) | ||
288 | if (qcow_write_snapshots(bs) < 0) | 288 | if (qcow_write_snapshots(bs) < 0) |
289 | goto fail; | 289 | goto fail; |
290 | #ifdef DEBUG_ALLOC | 290 | #ifdef DEBUG_ALLOC |
291 | - check_refcounts(bs); | 291 | + qcow2_check_refcounts(bs); |
292 | #endif | 292 | #endif |
293 | return 0; | 293 | return 0; |
294 | fail: | 294 | fail: |
@@ -332,7 +332,7 @@ int qcow2_snapshot_goto(BlockDriverState *bs, const char *snapshot_id) | @@ -332,7 +332,7 @@ int qcow2_snapshot_goto(BlockDriverState *bs, const char *snapshot_id) | ||
332 | goto fail; | 332 | goto fail; |
333 | 333 | ||
334 | #ifdef DEBUG_ALLOC | 334 | #ifdef DEBUG_ALLOC |
335 | - check_refcounts(bs); | 335 | + qcow2_check_refcounts(bs); |
336 | #endif | 336 | #endif |
337 | return 0; | 337 | return 0; |
338 | fail: | 338 | fail: |
@@ -369,7 +369,7 @@ int qcow2_snapshot_delete(BlockDriverState *bs, const char *snapshot_id) | @@ -369,7 +369,7 @@ int qcow2_snapshot_delete(BlockDriverState *bs, const char *snapshot_id) | ||
369 | return ret; | 369 | return ret; |
370 | } | 370 | } |
371 | #ifdef DEBUG_ALLOC | 371 | #ifdef DEBUG_ALLOC |
372 | - check_refcounts(bs); | 372 | + qcow2_check_refcounts(bs); |
373 | #endif | 373 | #endif |
374 | return 0; | 374 | return 0; |
375 | } | 375 | } |
block/qcow2.c
@@ -44,10 +44,6 @@ | @@ -44,10 +44,6 @@ | ||
44 | - L2 tables have always a size of one cluster. | 44 | - L2 tables have always a size of one cluster. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | -//#define DEBUG_ALLOC | ||
48 | -//#define DEBUG_ALLOC2 | ||
49 | -//#define DEBUG_EXT | ||
50 | - | ||
51 | 47 | ||
52 | typedef struct { | 48 | typedef struct { |
53 | uint32_t magic; | 49 | uint32_t magic; |
@@ -251,7 +247,7 @@ static int qcow_open(BlockDriverState *bs, const char *filename, int flags) | @@ -251,7 +247,7 @@ static int qcow_open(BlockDriverState *bs, const char *filename, int flags) | ||
251 | goto fail; | 247 | goto fail; |
252 | 248 | ||
253 | #ifdef DEBUG_ALLOC | 249 | #ifdef DEBUG_ALLOC |
254 | - check_refcounts(bs); | 250 | + qcow2_check_refcounts(bs); |
255 | #endif | 251 | #endif |
256 | return 0; | 252 | return 0; |
257 | 253 |
block/qcow2.h
@@ -27,6 +27,10 @@ | @@ -27,6 +27,10 @@ | ||
27 | 27 | ||
28 | #include "aes.h" | 28 | #include "aes.h" |
29 | 29 | ||
30 | +//#define DEBUG_ALLOC | ||
31 | +//#define DEBUG_ALLOC2 | ||
32 | +//#define DEBUG_EXT | ||
33 | + | ||
30 | #define QCOW_MAGIC (('Q' << 24) | ('F' << 16) | ('I' << 8) | 0xfb) | 34 | #define QCOW_MAGIC (('Q' << 24) | ('F' << 16) | ('I' << 8) | 0xfb) |
31 | #define QCOW_VERSION 2 | 35 | #define QCOW_VERSION 2 |
32 | 36 |