@samitouri / QOSamiQemu / commits / 718b2cb409

target/ppc: Use glib2 instead of strcasecmp/strncasecmp

This is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason: (1) QEMU always runs with the C locale so there's not an actual behaviour change here Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Link: https://lore.kernel.org/r/20260327134401.270186-9-kkostiuk@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Kostiantyn Kostiuk committed Mar 27, 2026 at 15:43 UTC 718b2cb409efac48eff0d4f072c54e8952b49e14
1 file changed +1 -1
target/ppc/kvm.c
+1 -1
@@ -2653,7 +2653,7 @@ static int kvm_ppc_register_host_cpu_type(void)
2653 */
2654 dc = DEVICE_CLASS(ppc_cpu_get_family_class(pvr_pcc));
2655 for (i = 0; ppc_cpu_aliases[i].alias != NULL; i++) {
2656 - if (strcasecmp(ppc_cpu_aliases[i].alias, dc->desc) == 0) {
2656 + if (g_ascii_strcasecmp(ppc_cpu_aliases[i].alias, dc->desc) == 0) {
2657 char *suffix;
2658
2659 ppc_cpu_aliases[i].model = g_strdup(object_class_get_name(oc));