Patchwork qapi: qmp-types.c and qmp-types.h

login
register
mail settings
Submitter Anthony Liguori
Date March 7, 2011, 1:26 a.m.
Message ID <1299461207-16223-1-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/85634/
State New
Headers show

Comments

Anthony Liguori - March 7, 2011, 1:26 a.m.
These are generated type functions.  This file will not be committed but is
included to help review.

Patch

diff --git a/qmp-types.c b/qmp-types.c
new file mode 100644
index 0000000..3162265
--- /dev/null
+++ b/qmp-types.c
@@ -0,0 +1,22 @@ 
+/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT */
+
+#include "qmp-types.h"
+#include "qemu-common.h"
+
+
+void qmp_free_version_info(VersionInfo *obj)
+{
+    if (!obj) {
+        return;
+    }
+    qemu_free(obj->package);
+
+    qmp_free_version_info(obj->next);
+    qemu_free(obj);
+}
+
+VersionInfo *qmp_alloc_version_info(void)
+{
+    BUILD_ASSERT(sizeof(VersionInfo) < 512);
+    return qemu_mallocz(512);
+}
diff --git a/qmp-types.h b/qmp-types.h
new file mode 100644
index 0000000..e6a4c8c
--- /dev/null
+++ b/qmp-types.h
@@ -0,0 +1,22 @@ 
+/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT */
+#ifndef QMP_TYPES_H
+#define QMP_TYPES_H
+
+#include "qmp-types-core.h"
+
+
+
+typedef struct VersionInfo VersionInfo;
+struct VersionInfo {
+    struct {
+        int64_t major;
+        int64_t minor;
+        int64_t micro;
+    } qemu;
+    char * package;
+    VersionInfo *next;
+};
+
+VersionInfo *qmp_alloc_version_info(void);
+void qmp_free_version_info(VersionInfo *obj);
+#endif