Blame 0028-spice-vmc-add-counter-to-debug-statements.patch

Justin M. Forbes a81953
From 2165916a311108d39c7aa45e5189af26712234b8 Mon Sep 17 00:00:00 2001
Justin M. Forbes a81953
From: Alon Levy <alevy@redhat.com>
Justin M. Forbes a81953
Date: Wed, 14 Jul 2010 16:30:35 +0300
Justin M. Forbes a81953
Subject: [PATCH 28/39] spice-vmc: add counter to debug statements
Justin M. Forbes a81953
Justin M. Forbes a81953
---
Justin M. Forbes a81953
 hw/spice-vmc.c |    3 ++-
Justin M. Forbes a81953
 1 files changed, 2 insertions(+), 1 deletions(-)
Justin M. Forbes a81953
Justin M. Forbes a81953
diff --git a/hw/spice-vmc.c b/hw/spice-vmc.c
Justin M. Forbes a81953
index 06e30e6..041f243 100644
Justin M. Forbes a81953
--- a/hw/spice-vmc.c
Justin M. Forbes a81953
+++ b/hw/spice-vmc.c
Justin M. Forbes a81953
@@ -23,8 +23,9 @@
Justin M. Forbes a81953
Justin M. Forbes a81953
 #define dprintf(_svc, _level, _fmt, ...)                                \
Justin M. Forbes a81953
     do {                                                                \
Justin M. Forbes a81953
+        static unsigned __dprintf_counter = 0;                          \
Justin M. Forbes a81953
         if (_svc->debug >= _level) {                                    \
Justin M. Forbes a81953
-            fprintf(stderr, "svc: " _fmt, ## __VA_ARGS__);              \
Justin M. Forbes a81953
+            fprintf(stderr, "svc: %3d: " _fmt, ++__dprintf_counter, ## __VA_ARGS__);\
Justin M. Forbes a81953
         }                                                               \
Justin M. Forbes a81953
     } while (0)
Justin M. Forbes a81953
Justin M. Forbes a81953
-- 
Justin M. Forbes a81953
1.7.2.3
Justin M. Forbes a81953