1/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
2
3/*
4 * Schema-defined QAPI types
5 *
6 * Copyright IBM, Corp. 2011
7 * Copyright (c) 2013-2018 Red Hat Inc.
8 *
9 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
10 * See the COPYING.LIB file in the top-level directory.
11 */
12
13#include "qemu/osdep.h"
14#include "qapi/dealloc-visitor.h"
15#include "qapi-types-run-state.h"
16#include "qapi-visit-run-state.h"
17
18const QEnumLookup RunState_lookup = {
19 .array = (const char *const[]) {
20 [RUN_STATE_DEBUG] = "debug",
21 [RUN_STATE_INMIGRATE] = "inmigrate",
22 [RUN_STATE_INTERNAL_ERROR] = "internal-error",
23 [RUN_STATE_IO_ERROR] = "io-error",
24 [RUN_STATE_PAUSED] = "paused",
25 [RUN_STATE_POSTMIGRATE] = "postmigrate",
26 [RUN_STATE_PRELAUNCH] = "prelaunch",
27 [RUN_STATE_FINISH_MIGRATE] = "finish-migrate",
28 [RUN_STATE_RESTORE_VM] = "restore-vm",
29 [RUN_STATE_RUNNING] = "running",
30 [RUN_STATE_SAVE_VM] = "save-vm",
31 [RUN_STATE_SHUTDOWN] = "shutdown",
32 [RUN_STATE_SUSPENDED] = "suspended",
33 [RUN_STATE_WATCHDOG] = "watchdog",
34 [RUN_STATE_GUEST_PANICKED] = "guest-panicked",
35 [RUN_STATE_COLO] = "colo",
36 [RUN_STATE_PRECONFIG] = "preconfig",
37 },
38 .size = RUN_STATE__MAX
39};
40
41const QEnumLookup ShutdownCause_lookup = {
42 .array = (const char *const[]) {
43 [SHUTDOWN_CAUSE_NONE] = "none",
44 [SHUTDOWN_CAUSE_HOST_ERROR] = "host-error",
45 [SHUTDOWN_CAUSE_HOST_QMP_QUIT] = "host-qmp-quit",
46 [SHUTDOWN_CAUSE_HOST_QMP_SYSTEM_RESET] = "host-qmp-system-reset",
47 [SHUTDOWN_CAUSE_HOST_SIGNAL] = "host-signal",
48 [SHUTDOWN_CAUSE_HOST_UI] = "host-ui",
49 [SHUTDOWN_CAUSE_GUEST_SHUTDOWN] = "guest-shutdown",
50 [SHUTDOWN_CAUSE_GUEST_RESET] = "guest-reset",
51 [SHUTDOWN_CAUSE_GUEST_PANIC] = "guest-panic",
52 [SHUTDOWN_CAUSE_SUBSYSTEM_RESET] = "subsystem-reset",
53 },
54 .size = SHUTDOWN_CAUSE__MAX
55};
56
57void qapi_free_StatusInfo(StatusInfo *obj)
58{
59 Visitor *v;
60
61 if (!obj) {
62 return;
63 }
64
65 v = qapi_dealloc_visitor_new();
66 visit_type_StatusInfo(v, NULL, &obj, NULL);
67 visit_free(v);
68}
69
70const QEnumLookup WatchdogAction_lookup = {
71 .array = (const char *const[]) {
72 [WATCHDOG_ACTION_RESET] = "reset",
73 [WATCHDOG_ACTION_SHUTDOWN] = "shutdown",
74 [WATCHDOG_ACTION_POWEROFF] = "poweroff",
75 [WATCHDOG_ACTION_PAUSE] = "pause",
76 [WATCHDOG_ACTION_DEBUG] = "debug",
77 [WATCHDOG_ACTION_NONE] = "none",
78 [WATCHDOG_ACTION_INJECT_NMI] = "inject-nmi",
79 },
80 .size = WATCHDOG_ACTION__MAX
81};
82
83const QEnumLookup GuestPanicAction_lookup = {
84 .array = (const char *const[]) {
85 [GUEST_PANIC_ACTION_PAUSE] = "pause",
86 [GUEST_PANIC_ACTION_POWEROFF] = "poweroff",
87 },
88 .size = GUEST_PANIC_ACTION__MAX
89};
90
91const QEnumLookup GuestPanicInformationType_lookup = {
92 .array = (const char *const[]) {
93 [GUEST_PANIC_INFORMATION_TYPE_HYPER_V] = "hyper-v",
94 [GUEST_PANIC_INFORMATION_TYPE_S390] = "s390",
95 },
96 .size = GUEST_PANIC_INFORMATION_TYPE__MAX
97};
98
99void qapi_free_GuestPanicInformation(GuestPanicInformation *obj)
100{
101 Visitor *v;
102
103 if (!obj) {
104 return;
105 }
106
107 v = qapi_dealloc_visitor_new();
108 visit_type_GuestPanicInformation(v, NULL, &obj, NULL);
109 visit_free(v);
110}
111
112void qapi_free_GuestPanicInformationHyperV(GuestPanicInformationHyperV *obj)
113{
114 Visitor *v;
115
116 if (!obj) {
117 return;
118 }
119
120 v = qapi_dealloc_visitor_new();
121 visit_type_GuestPanicInformationHyperV(v, NULL, &obj, NULL);
122 visit_free(v);
123}
124
125const QEnumLookup S390CrashReason_lookup = {
126 .array = (const char *const[]) {
127 [S390_CRASH_REASON_UNKNOWN] = "unknown",
128 [S390_CRASH_REASON_DISABLED_WAIT] = "disabled-wait",
129 [S390_CRASH_REASON_EXTINT_LOOP] = "extint-loop",
130 [S390_CRASH_REASON_PGMINT_LOOP] = "pgmint-loop",
131 [S390_CRASH_REASON_OPINT_LOOP] = "opint-loop",
132 },
133 .size = S390_CRASH_REASON__MAX
134};
135
136void qapi_free_GuestPanicInformationS390(GuestPanicInformationS390 *obj)
137{
138 Visitor *v;
139
140 if (!obj) {
141 return;
142 }
143
144 v = qapi_dealloc_visitor_new();
145 visit_type_GuestPanicInformationS390(v, NULL, &obj, NULL);
146 visit_free(v);
147}
148
149/* Dummy declaration to prevent empty .o file */
150char qapi_dummy_qapi_types_run_state_c;
151