[Spice-devel] [PATCH] Make monitors config debug output more clear

Jonathon Jongsma jjongsma at redhat.com
Tue Jun 30 10:26:38 PDT 2015


Indicate whether the monitors config debug output is from sending or
receiving new monitors configuration. You can tell this by looking at
which channel is involved (main vs display), but making it more explicit
is helpful for glancing through logs.
---
 src/channel-display.c | 2 +-
 src/channel-main.c    | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/channel-display.c b/src/channel-display.c
index efe2259..568aa2e 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -1713,7 +1713,7 @@ static void display_handle_monitors_config(SpiceChannel *channel, SpiceMsgIn *in
     g_return_if_fail(config != NULL);
     g_return_if_fail(config->count > 0);
 
-    CHANNEL_DEBUG(channel, "monitors config: n: %d/%d", config->count, config->max_allowed);
+    CHANNEL_DEBUG(channel, "received new monitors config from guest: n: %d/%d", config->count, config->max_allowed);
 
     c->monitors_max = config->max_allowed;
     if (CLAMP_CHECK(c->monitors_max, 1, MONITORS_MAX)) {
diff --git a/src/channel-main.c b/src/channel-main.c
index c55d097..35c5b2f 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -1071,6 +1071,7 @@ gboolean spice_main_send_monitor_config(SpiceMainChannel *channel)
         c->disable_display_align == FALSE)
         mon->flags |= VD_AGENT_CONFIG_MONITORS_FLAG_USE_POS;
 
+    CHANNEL_DEBUG(channel, "sending new monitors config to guest");
     j = 0;
     for (i = 0; i < SPICE_N_ELEMENTS(c->display); i++) {
         if (!c->display[i].enabled) {
@@ -1084,7 +1085,7 @@ gboolean spice_main_send_monitor_config(SpiceMainChannel *channel)
         mon->monitors[j].height = c->display[i].height;
         mon->monitors[j].x = c->display[i].x;
         mon->monitors[j].y = c->display[i].y;
-        CHANNEL_DEBUG(channel, "monitor config: #%d %dx%d+%d+%d @ %d bpp", j,
+        CHANNEL_DEBUG(channel, "monitor #%d: %dx%d+%d+%d @ %d bpp", j,
                       mon->monitors[j].width, mon->monitors[j].height,
                       mon->monitors[j].x, mon->monitors[j].y,
                       mon->monitors[j].depth);
-- 
2.1.0



More information about the Spice-devel mailing list