qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RESEND PATCH v3 3/5] Add "info uuid" command to monitor.


From: Gleb Natapov
Subject: [Qemu-devel] [RESEND PATCH v3 3/5] Add "info uuid" command to monitor.
Date: Mon, 16 Jun 2008 16:01:51 +0300
User-agent: StGIT/0.14.2

Signed-off-by: Gleb Natapov <address@hidden>
---

 monitor.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/monitor.c b/monitor.c
index 1eb8be1..93e71fa 100644
--- a/monitor.c
+++ b/monitor.c
@@ -251,6 +251,17 @@ static void do_info_name(void)
         term_printf("%s\n", qemu_name);
 }
 
+static void do_info_uuid(void)
+{
+    char uuid_str[37];
+    sprintf(uuid_str, UUID_FMT, qemu_uuid[0], qemu_uuid[1], qemu_uuid[2],
+            qemu_uuid[3], qemu_uuid[4], qemu_uuid[5], qemu_uuid[6],
+            qemu_uuid[7], qemu_uuid[8], qemu_uuid[9], qemu_uuid[10],
+            qemu_uuid[11], qemu_uuid[12], qemu_uuid[13], qemu_uuid[14],
+            qemu_uuid[15]);
+    term_printf("%s\n", uuid_str);
+}
+
 static void do_info_block(void)
 {
     bdrv_info();
@@ -1459,6 +1470,8 @@ static term_cmd_t info_cmds[] = {
       "", "show the vnc server status"},
     { "name", "", do_info_name,
       "", "show the current VM name" },
+    { "uuid", "", do_info_uuid,
+      "", "show the current VM UUID" },
 #if defined(TARGET_PPC)
     { "cpustats", "", do_info_cpu_stats,
       "", "show CPU statistics", },





reply via email to

[Prev in Thread] Current Thread [Next in Thread]