Commit 14899cdf3a6e1fc0d72097a43c1c53a1354fbfbf

Authored by Filip Navara
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>
block/qcow2-snapshot.c
... ... @@ -288,7 +288,7 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
288 288 if (qcow_write_snapshots(bs) < 0)
289 289 goto fail;
290 290 #ifdef DEBUG_ALLOC
291   - check_refcounts(bs);
  291 + qcow2_check_refcounts(bs);
292 292 #endif
293 293 return 0;
294 294 fail:
... ... @@ -332,7 +332,7 @@ int qcow2_snapshot_goto(BlockDriverState *bs, const char *snapshot_id)
332 332 goto fail;
333 333  
334 334 #ifdef DEBUG_ALLOC
335   - check_refcounts(bs);
  335 + qcow2_check_refcounts(bs);
336 336 #endif
337 337 return 0;
338 338 fail:
... ... @@ -369,7 +369,7 @@ int qcow2_snapshot_delete(BlockDriverState *bs, const char *snapshot_id)
369 369 return ret;
370 370 }
371 371 #ifdef DEBUG_ALLOC
372   - check_refcounts(bs);
  372 + qcow2_check_refcounts(bs);
373 373 #endif
374 374 return 0;
375 375 }
... ...
block/qcow2.c
... ... @@ -44,10 +44,6 @@
44 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 48 typedef struct {
53 49 uint32_t magic;
... ... @@ -251,7 +247,7 @@ static int qcow_open(BlockDriverState *bs, const char *filename, int flags)
251 247 goto fail;
252 248  
253 249 #ifdef DEBUG_ALLOC
254   - check_refcounts(bs);
  250 + qcow2_check_refcounts(bs);
255 251 #endif
256 252 return 0;
257 253  
... ...
block/qcow2.h
... ... @@ -27,6 +27,10 @@
27 27  
28 28 #include "aes.h"
29 29  
  30 +//#define DEBUG_ALLOC
  31 +//#define DEBUG_ALLOC2
  32 +//#define DEBUG_EXT
  33 +
30 34 #define QCOW_MAGIC (('Q' << 24) | ('F' << 16) | ('I' << 8) | 0xfb)
31 35 #define QCOW_VERSION 2
32 36  
... ...