]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/core/machine: Add the missing delimiter in cpu_slot_to_string()
authorYanan Wang <wangyanan55@huawei.com>
Fri, 8 Oct 2021 07:50:40 +0000 (15:50 +0800)
committerLaurent Vivier <laurent@vivier.eu>
Sun, 31 Oct 2021 20:05:40 +0000 (21:05 +0100)
The expected output string from cpu_slot_to_string() ought to be
like "socket-id: *, die-id: *, core-id: *, thread-id: *", so add
the missing ", " before "die-id". This affects the readability
of the error message.

Fixes: 176d2cda0d ("i386/cpu: Consolidate die-id validity in smp context")
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211008075040.18028-1-wangyanan55@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw/core/machine.c

index b8d95eec32d4c9bc27ce1df505e69a091e69aa5f..0a23ae3106066560acb4e1c01d0067d7a7861795 100644 (file)
@@ -1157,6 +1157,9 @@ static char *cpu_slot_to_string(const CPUArchId *cpu)
         g_string_append_printf(s, "socket-id: %"PRId64, cpu->props.socket_id);
     }
     if (cpu->props.has_die_id) {
+        if (s->len) {
+            g_string_append_printf(s, ", ");
+        }
         g_string_append_printf(s, "die-id: %"PRId64, cpu->props.die_id);
     }
     if (cpu->props.has_core_id) {