diff options
author | Yanan Wang <wangyanan55@huawei.com> | 2021-10-08 15:50:40 +0800 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-10-31 21:05:40 +0100 |
commit | 3a23a0c06171c97e7327dd75ae5503f2e38fe749 (patch) | |
tree | bb62a27561841ed85eff3a1f2a15de26f007399c /hw/core/machine.c | |
parent | 61848717d639446b58b069e480739a757d74813d (diff) |
hw/core/machine: Add the missing delimiter in cpu_slot_to_string()
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>
Diffstat (limited to 'hw/core/machine.c')
-rw-r--r-- | hw/core/machine.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c index b8d95eec32..0a23ae3106 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) { |