Decorating the application name is not the best way to let users figure out
if KVM is enabled or not.  It's impossible for management applications to
figure out, inconsistent with other accelerators like kqemu, and clutters the
title bar.

We may experience a little user pain in the short term since we've told users to
look for it to determine if KVM is enabled or not but having a proper monitor
command is better in the long run.

I also think it will be hard to merge this into upstream QEMU whereas a monitor
command will be obvious to merge.

Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]>

diff --git a/qemu/console.h b/qemu/console.h
index c12898a..561ef51 100644
--- a/qemu/console.h
+++ b/qemu/console.h
@@ -180,6 +180,4 @@ const char *readline_get_history(unsigned int index);
 void readline_start(const char *prompt, int is_password,
                     ReadLineFunc *readline_func, void *opaque);
 
-void decorate_application_name(char *name, int max_len);
-
 #endif
diff --git a/qemu/sdl.c b/qemu/sdl.c
index 4b7229e..719e2bd 100644
--- a/qemu/sdl.c
+++ b/qemu/sdl.c
@@ -220,7 +220,7 @@ static void sdl_process_key(SDL_KeyboardEvent *ev)
 
 static void sdl_update_caption(void)
 {
-    char buf[1024], appname[20] = "QEMU";
+    char buf[1024];
     const char *status = "";
 
     if (!vm_running)
@@ -232,14 +232,12 @@ static void sdl_update_caption(void)
             status = " - Press Ctrl-Alt-Shift to exit grab";
     }
 
-    decorate_application_name(appname, sizeof appname);
-
     if (qemu_name)
-        snprintf(buf, sizeof(buf), "%s (%s)%s", appname, qemu_name, status);
+        snprintf(buf, sizeof(buf), "QEMU (%s)%s", qemu_name, status);
     else
-        snprintf(buf, sizeof(buf), "%s%s", appname, status);
+        snprintf(buf, sizeof(buf), "QEMU%s", status);
 
-    SDL_WM_SetCaption(buf, appname);
+    SDL_WM_SetCaption(buf, "QEMU");
 }
 
 static void sdl_hide_cursor(void)
diff --git a/qemu/vl.c b/qemu/vl.c
index 0bb4e5b..24e6971 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -268,17 +268,6 @@ static void main_loop_break(void)
        qemu_kvm_notify_work();
 }
 
-void decorate_application_name(char *appname, int max_len)
-{
-    if (kvm_enabled())
-    {
-        int remain = max_len - strlen(appname) - 1;
-
-        if (remain > 0)
-            strncat(appname, "/KVM", remain);
-    }
-}
-
 /***********************************************************/
 /* x86 ISA bus support */
 
diff --git a/qemu/vnc.c b/qemu/vnc.c
index 7f10af6..31118ee 100644
--- a/qemu/vnc.c
+++ b/qemu/vnc.c
@@ -1270,7 +1270,6 @@ static int protocol_client_init(VncState *vs, uint8_t 
*data, size_t len)
     char pad[3] = { 0, 0, 0 };
     char buf[1024];
     int size;
-    char prog[30] = "QEMU";
 
     vs->width = vs->ds->width;
     vs->height = vs->ds->height;
@@ -1315,12 +1314,10 @@ static int protocol_client_init(VncState *vs, uint8_t 
*data, size_t len)
 
     vnc_write(vs, pad, 3);           /* padding */
 
-    decorate_application_name((char *)prog, sizeof prog);
-
     if (qemu_name)
-        size = snprintf(buf, sizeof(buf), "%s (%s)", prog, qemu_name);
+        size = snprintf(buf, sizeof(buf), "QEMU (%s)", qemu_name);
     else
-        size = snprintf(buf, sizeof(buf), "%s", prog);
+        size = snprintf(buf, sizeof(buf), "QEMU");
 
     vnc_write_u32(vs, size);
     vnc_write(vs, buf, size);
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to