* [Qemu-devel] [PATCH] Fix QCOW2 debugging code to compile again
@ 2009-06-23 15:25 Filip Navara
2009-06-23 16:29 ` Blue Swirl
0 siblings, 1 reply; 4+ messages in thread
From: Filip Navara @ 2009-06-23 15:25 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Filip Navara <filip.navara@gmail.com>
---
block/qcow2-snapshot.c | 6 +++---
block/qcow2.c | 6 +-----
block/qcow2.h | 4 ++++
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index e1e4d89..94cb838 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
@@ -288,7 +288,7 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
if (qcow_write_snapshots(bs) < 0)
goto fail;
#ifdef DEBUG_ALLOC
- check_refcounts(bs);
+ qcow2_check_refcounts(bs);
#endif
return 0;
fail:
@@ -332,7 +332,7 @@ int qcow2_snapshot_goto(BlockDriverState *bs, const char *snapshot_id)
goto fail;
#ifdef DEBUG_ALLOC
- check_refcounts(bs);
+ qcow2_check_refcounts(bs);
#endif
return 0;
fail:
@@ -369,7 +369,7 @@ int qcow2_snapshot_delete(BlockDriverState *bs, const char *snapshot_id)
return ret;
}
#ifdef DEBUG_ALLOC
- check_refcounts(bs);
+ qcow2_check_refcounts(bs);
#endif
return 0;
}
diff --git a/block/qcow2.c b/block/qcow2.c
index 9acbddf..20c114b 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -44,10 +44,6 @@
- L2 tables have always a size of one cluster.
*/
-//#define DEBUG_ALLOC
-//#define DEBUG_ALLOC2
-//#define DEBUG_EXT
-
typedef struct {
uint32_t magic;
@@ -251,7 +247,7 @@ static int qcow_open(BlockDriverState *bs, const char *filename, int flags)
goto fail;
#ifdef DEBUG_ALLOC
- check_refcounts(bs);
+ qcow2_check_refcounts(bs);
#endif
return 0;
diff --git a/block/qcow2.h b/block/qcow2.h
index d734003..8624e0c 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -27,6 +27,10 @@
#include "aes.h"
+/* #define DEBUG_ALLOC */
+/* #define DEBUG_ALLOC2 */
+/* #define DEBUG_EXT */
+
#define QCOW_MAGIC (('Q' << 24) | ('F' << 16) | ('I' << 8) | 0xfb)
#define QCOW_VERSION 2
--
1.6.3.msysgit.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix QCOW2 debugging code to compile again
2009-06-23 15:25 [Qemu-devel] [PATCH] Fix QCOW2 debugging code to compile again Filip Navara
@ 2009-06-23 16:29 ` Blue Swirl
2009-06-23 17:42 ` malc
0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2009-06-23 16:29 UTC (permalink / raw)
To: Filip Navara; +Cc: qemu-devel
On T, Filip Navara <filip.navara@gmail.com> wrote:
> Signed-off-by: Filip Navara <filip.navara@gmail.com>
> -//#define DEBUG_ALLOC
> -//#define DEBUG_ALLOC2
> -//#define DEBUG_EXT
> +/* #define DEBUG_ALLOC */
> +/* #define DEBUG_ALLOC2 */
> +/* #define DEBUG_EXT */
The C99 comment version is much more convenient than K&R comment
version in cases like this, where the intention is to be able to
enable the define quickly.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix QCOW2 debugging code to compile again
2009-06-23 16:29 ` Blue Swirl
@ 2009-06-23 17:42 ` malc
2009-06-24 7:13 ` Kevin Wolf
0 siblings, 1 reply; 4+ messages in thread
From: malc @ 2009-06-23 17:42 UTC (permalink / raw)
To: Blue Swirl; +Cc: Filip Navara, qemu-devel
On Tue, 23 Jun 2009, Blue Swirl wrote:
> On T, Filip Navara <filip.navara@gmail.com> wrote:
> > Signed-off-by: Filip Navara <filip.navara@gmail.com>
>
> > -//#define DEBUG_ALLOC
> > -//#define DEBUG_ALLOC2
> > -//#define DEBUG_EXT
>
> > +/* #define DEBUG_ALLOC */
> > +/* #define DEBUG_ALLOC2 */
> > +/* #define DEBUG_EXT */
>
> The C99 comment version is much more convenient than K&R comment
> version in cases like this, where the intention is to be able to
> enable the define quickly.
It's all the same for me: C-u A-;
(defun caml-comment-till-end-of-line (&optional arg)
(interactive "P")
(save-excursion
(if (looking-at search-whitespace-regexp)
(re-search-forward search-whitespace-regexp))
(comment-region (point) (progn (end-of-line) (point)) arg)))
(global-set-key [(alt ?\;)] 'caml-comment-till-end-of-line)
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix QCOW2 debugging code to compile again
2009-06-23 17:42 ` malc
@ 2009-06-24 7:13 ` Kevin Wolf
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2009-06-24 7:13 UTC (permalink / raw)
To: malc; +Cc: Blue Swirl, Filip Navara, qemu-devel
malc schrieb:
> On Tue, 23 Jun 2009, Blue Swirl wrote:
>
>> On T, Filip Navara <filip.navara@gmail.com> wrote:
>>> Signed-off-by: Filip Navara <filip.navara@gmail.com>
>>> -//#define DEBUG_ALLOC
>>> -//#define DEBUG_ALLOC2
>>> -//#define DEBUG_EXT
>>> +/* #define DEBUG_ALLOC */
>>> +/* #define DEBUG_ALLOC2 */
>>> +/* #define DEBUG_EXT */
>> The C99 comment version is much more convenient than K&R comment
>> version in cases like this, where the intention is to be able to
>> enable the define quickly.
I agree.
> It's all the same for me: C-u A-;
You're not alone in the world.
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-24 7:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23 15:25 [Qemu-devel] [PATCH] Fix QCOW2 debugging code to compile again Filip Navara
2009-06-23 16:29 ` Blue Swirl
2009-06-23 17:42 ` malc
2009-06-24 7:13 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).