Commit f1f23ad58b42a9094fd8e6c0429c199d2f1280cb

Authored by blueswir1
1 parent 8fcb1b90

Add "info uuid" command to monitor (Gleb Natapov)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5258 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 11 additions and 0 deletions
monitor.c
@@ -249,6 +249,15 @@ static void do_info_name(void) @@ -249,6 +249,15 @@ static void do_info_name(void)
249 term_printf("%s\n", qemu_name); 249 term_printf("%s\n", qemu_name);
250 } 250 }
251 251
  252 +static void do_info_uuid(void)
  253 +{
  254 + term_printf(UUID_FMT "\n", qemu_uuid[0], qemu_uuid[1], qemu_uuid[2],
  255 + qemu_uuid[3], qemu_uuid[4], qemu_uuid[5], qemu_uuid[6],
  256 + qemu_uuid[7], qemu_uuid[8], qemu_uuid[9], qemu_uuid[10],
  257 + qemu_uuid[11], qemu_uuid[12], qemu_uuid[13], qemu_uuid[14],
  258 + qemu_uuid[15]);
  259 +}
  260 +
252 static void do_info_block(void) 261 static void do_info_block(void)
253 { 262 {
254 bdrv_info(); 263 bdrv_info();
@@ -1497,6 +1506,8 @@ static term_cmd_t info_cmds[] = { @@ -1497,6 +1506,8 @@ static term_cmd_t info_cmds[] = {
1497 "", "show the vnc server status"}, 1506 "", "show the vnc server status"},
1498 { "name", "", do_info_name, 1507 { "name", "", do_info_name,
1499 "", "show the current VM name" }, 1508 "", "show the current VM name" },
  1509 + { "uuid", "", do_info_uuid,
  1510 + "", "show the current VM UUID" },
1500 #if defined(TARGET_PPC) 1511 #if defined(TARGET_PPC)
1501 { "cpustats", "", do_info_cpu_stats, 1512 { "cpustats", "", do_info_cpu_stats,
1502 "", "show CPU statistics", }, 1513 "", "show CPU statistics", },