[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/6] hw/core/machine: Add the missing delimiter in cpu_slot_to_str
From: |
Laurent Vivier |
Subject: |
[PULL 2/6] hw/core/machine: Add the missing delimiter in cpu_slot_to_string() |
Date: |
Mon, 1 Nov 2021 09:27:43 +0100 |
From: Yanan Wang <wangyanan55@huawei.com>
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 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index b8d95eec32d4..0a23ae310606 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -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) {
--
2.31.1
- [PULL 0/6] Trivial branch for 6.2 patches, Laurent Vivier, 2021/11/01
- [PULL 1/6] monitor: Trim some trailing space from human-readable output, Laurent Vivier, 2021/11/01
- [PULL 3/6] MAINTAINERS: Split HPPA TCG vs HPPA machines/hardware, Laurent Vivier, 2021/11/01
- [PULL 5/6] hw/input/lasips2: Move LASIPS2State declaration to 'hw/input/lasips2.h', Laurent Vivier, 2021/11/01
- [PULL 2/6] hw/core/machine: Add the missing delimiter in cpu_slot_to_string(),
Laurent Vivier <=
- [PULL 4/6] hw/input/lasips2: Fix typos in function names, Laurent Vivier, 2021/11/01
- [PULL 6/6] hw/input/lasips2: QOM'ify the Lasi PS/2, Laurent Vivier, 2021/11/01