>> + CPUListState *s = user_data; >> + const S390CPUClass *scc = S390_CPU_CLASS((ObjectClass *)data); >> + char *name = g_strdup(object_class_get_name((ObjectClass *)data)); >> >> /* strip off the -s390-cpu */ >> g_strrstr(name, "-" TYPE_S390_CPU)[0] = 0; >> - (*info->print)(info->f, "s390 %-15s %-35s %s\n", name, scc->desc, >> - details); >> + (*s->cpu_fprintf)(s->file, "s390 %-15s %-35s (%smigration-safe)\n", >> name, >> + scc->desc, scc->is_static ? "static, " : ""); > > Hm, that now prints 's390 host' as 'migration safe'...
Very good point, will fix, thanks! > >> g_free(name); >> } >> >> +static gint s390_cpu_list_compare(gconstpointer a, gconstpointer b) >> +{ >> + const S390CPUClass *cc_a = S390_CPU_CLASS((ObjectClass *)a); >> + const S390CPUClass *cc_b = S390_CPU_CLASS((ObjectClass *)b); >> + const char *name_a = object_class_get_name((ObjectClass *)a); >> + const char *name_b = object_class_get_name((ObjectClass *)b); >> + >> + /* move qemu and host to the top of the list, qemu first, host second */ >> + if (name_a[0] == 'q') { >> + return -1; >> + } else if (name_b[0] == 'q') { >> + return 1; >> + } else if (name_a[0] == 'h') { >> + return -1; >> + } else if (name_b[0] == 'h') { >> + return 1; >> + } > > Are we sure that there will never be models starting with q or h? But > we can worry about that later. Could be but unlikely. In the worst case sorting would be wrong, I think we can live with that :) -- Thanks, David