monitor_printf(mon, " type: \"%s\"\n", l->value->type);
monitor_printf(mon, " vcpus_count: \"%" PRIu64 "\"\n",
l->value->vcpus_count);
- if (l->value->has_qom_path) {
+ if (l->value->qom_path) {
monitor_printf(mon, " qom_path: \"%s\"\n", l->value->qom_path);
}
value->qom_path = object_get_canonical_path(OBJECT(cpu));
value->thread_id = cpu->thread_id;
- value->has_props = !!mc->cpu_index_to_instance_props;
- if (value->has_props) {
+ if (mc->cpu_index_to_instance_props) {
CpuInstanceProperties *props;
props = g_malloc0(sizeof(*props));
*props = mc->cpu_index_to_instance_props(ms, cpu->cpu_index);
}
if (mc->alias) {
- info->has_alias = true;
info->alias = g_strdup(mc->alias);
}
info->deprecated = !!mc->deprecation_reason;
if (mc->default_cpu_type) {
info->default_cpu_type = g_strdup(mc->default_cpu_type);
- info->has_default_cpu_type = true;
}
if (mc->default_ram_id) {
info->default_ram_id = g_strdup(mc->default_ram_id);
- info->has_default_ram_id = true;
}
QAPI_LIST_PREPEND(mach_list, info);
m = g_malloc0(sizeof(*m));
m->id = g_strdup(object_get_canonical_path_component(obj));
- m->has_id = !!m->id;
m->size = object_property_get_uint(obj, "size", &error_abort);
m->merge = object_property_get_bool(obj, "merge", &error_abort);
for (i = 0; i < nb_numa_nodes; i++) {
g_string_append_printf(buf, "node %d cpus:", i);
for (cpu = cpu_list; cpu; cpu = cpu->next) {
- if (cpu->value->has_props && cpu->value->props->has_node_id &&
+ if (cpu->value->props && cpu->value->props->has_node_id &&
cpu->value->props->node_id == i) {
g_string_append_printf(buf, " %" PRIi64, cpu->value->cpu_index);
}
cpu = machine->possible_cpus->cpus[i].cpu;
if (cpu) {
- cpu_item->has_qom_path = true;
cpu_item->qom_path = object_get_canonical_path(cpu);
}
QAPI_LIST_PREPEND(head, cpu_item);
machine_free_boot_config(ms);
ms->boot_config = *config;
- if (!config->has_order) {
- ms->boot_config.has_order = true;
+ if (!config->order) {
ms->boot_config.order = g_strdup(machine_class->default_boot_order);
}
}
if (!visit_type_BootConfiguration(v, name, &config, errp)) {
return;
}
- if (config->has_order) {
+ if (config->order) {
validate_bootdevices(config->order, errp);
if (*errp) {
goto out_free;
}
}
- if (config->has_once) {
+ if (config->once) {
validate_bootdevices(config->once, errp);
if (*errp) {
goto out_free;
{
cpu_synchronize_all_post_init();
- if (current_machine->boot_config.has_once) {
+ if (current_machine->boot_config.once) {
qemu_boot_set(current_machine->boot_config.once, &error_fatal);
qemu_register_reset(restore_boot_order, g_strdup(current_machine->boot_config.order));
}
}
}
- have_memdevs = have_memdevs ? : node->has_memdev;
- have_mem = have_mem ? : node->has_mem;
- if ((node->has_mem && have_memdevs) || (node->has_memdev && have_mem)) {
+ have_memdevs = have_memdevs || node->memdev;
+ have_mem = have_mem || node->has_mem;
+ if ((node->has_mem && have_memdevs) || (node->memdev && have_mem)) {
error_setg(errp, "numa configuration should use either mem= or memdev=,"
"mixing both is not allowed");
return;
" use -numa node,memdev instead");
}
}
- if (node->has_memdev) {
+ if (node->memdev) {
Object *o;
o = object_resolve_path_type(node->memdev, TYPE_MEMORY_BACKEND, NULL);
if (!o) {
const DeviceState *dev = DEVICE(md);
if (dev->id) {
- di->has_id = true;
di->id = g_strdup(dev->id);
}
di->hotplugged = dev->hotplugged;
}
/* insert splash file if user configurated */
- if (current_machine->boot_config.has_splash) {
+ if (current_machine->boot_config.splash) {
const char *boot_splash_filename = current_machine->boot_config.splash;
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, boot_splash_filename);
if (filename == NULL) {
DeviceState *dev = DEVICE(md);
if (dev->id) {
- vi->has_id = true;
vi->id = g_strdup(dev->id);
}
char *qom_path = object_get_canonical_path(OBJECT(dev));
const uint64_t * const size_p = data;
- qapi_event_send_memory_device_size_change(!!dev->id, dev->id, *size_p,
- qom_path);
+ qapi_event_send_memory_device_size_change(dev->id, *size_p, qom_path);
g_free(qom_path);
}
DeviceState *dev = DEVICE(md);
if (dev->id) {
- vi->has_id = true;
vi->id = g_strdup(dev->id);
}
assert self.type
# Temporary hack to support dropping the has_FOO in reviewable chunks
opt_out = [
- 'qapi/machine.json',
- 'qapi/machine-target.json',
'qapi/migration.json',
'qapi/misc.json',
'qapi/net.json',
qobject_unref(qdict_out);
} else {
expansion_info->model->props = QOBJECT(qdict_out);
- expansion_info->model->has_props = true;
}
object_unref(obj);
QDict *props = NULL;
const char *base_name;
- xc = x86_cpu_from_model(model->name,
- model->has_props ?
- qobject_to(QDict, model->props) :
- NULL, &err);
+ xc = x86_cpu_from_model(model->name, qobject_to(QDict, model->props),
+ &err);
if (err) {
goto out;
}
props = qdict_new();
ret->model = g_new0(CpuModelInfo, 1);
ret->model->props = QOBJECT(props);
- ret->model->has_props = true;
switch (type) {
case CPU_MODEL_EXPANSION_TYPE_STATIC:
*/
if (default_cpu_version != CPU_VERSION_LEGACY) {
info->alias_of = x86_cpu_class_get_alias_of(cc);
- info->has_alias_of = !!info->alias_of;
}
QAPI_LIST_PREPEND(*cpu_list, info);
qobject_unref(qdict);
} else {
info->props = QOBJECT(qdict);
- info->has_props = true;
}
}