#include "qapi/qapi-commands-block-core.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qapi-commands-run-state.h"
+#include "qapi/qapi-commands-ui.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/iothread.h"
}, {
.name = "file",
.type = QEMU_OPT_STRING,
- .help = "Sets the name of the file from which\n"
+ .help = "Sets the name of the file from which "
"the fw_cfg blob will be loaded",
}, {
.name = "string",
return 1;
}
-/***********************************************************/
-/* main execution loop */
-
struct vm_change_state_entry {
VMChangeStateHandler *cb;
void *opaque;
visit_free(v);
}
+DisplayOptions *qmp_query_display_options(Error **errp)
+{
+ return QAPI_CLONE(DisplayOptions, &dpy);
+}
+
static void parse_display(const char *p)
{
const char *opts;
size = strlen(str); /* NUL terminator NOT included in fw_cfg blob */
buf = g_memdup(str, size);
} else {
- if (!g_file_get_contents(file, &buf, &size, NULL)) {
- error_setg(errp, "can't load %s", file);
+ GError *err = NULL;
+ if (!g_file_get_contents(file, &buf, &size, &err)) {
+ error_setg(errp, "can't load %s: %s", file, err->message);
+ g_error_free(err);
return -1;
}
}
}
chardev = qemu_opt_get(opts, "chardev");
+ if (!chardev) {
+ error_report("chardev is required");
+ exit(1);
+ }
chr = qemu_chr_find(chardev);
if (chr == NULL) {
error_setg(errp, "chardev \"%s\" not found", chardev);
list = object_class_get_list_sorted(TYPE_USER_CREATABLE, false);
for (l = list; l != NULL; l = l->next) {
ObjectClass *oc = OBJECT_CLASS(l->data);
- printf("%s\n", object_class_get_name(oc));
+ printf(" %s\n", object_class_get_name(oc));
}
g_slist_free(list);
exit(0);
}
str = g_string_new(NULL);
- g_string_append_printf(str, "%s.%s=%s", type,
- prop->name, prop->type);
+ g_string_append_printf(str, " %s=<%s>", prop->name, prop->type);
if (prop->description) {
+ if (str->len < 24) {
+ g_string_append_printf(str, "%*s", 24 - (int)str->len, "");
+ }
g_string_append_printf(str, " - %s", prop->description);
}
g_ptr_array_add(array, g_string_free(str, false));
}
g_ptr_array_sort(array, (GCompareFunc)qemu_pstrcmp0);
+ if (array->len > 0) {
+ printf("%s options:\n", type);
+ } else {
+ printf("There are no options for %s.\n", type);
+ }
for (i = 0; i < array->len; i++) {
printf("%s\n", (char *)array->pdata[i]);
}
break;
#endif
case QEMU_OPTION_bt:
+ warn_report("The bluetooth subsystem is deprecated and will "
+ "be removed soon. If the bluetooth subsystem is "
+ "still useful for you, please send a mail to "
add_device_config(DEV_BT, optarg);
break;
case QEMU_OPTION_audio_help: