summary refs log tree commit diff stats
path: root/include/qapi/error-internal.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-05-23 19:41:40 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-06-05 20:24:51 +0200
commit8714d366e7e29d3ca8cebc8504e18c4cd7b5cf48 (patch)
treeab3b4f54e16fa44d5c65e388c67a1bb0eecc1734 /include/qapi/error-internal.h
parentbfe0f6b02a4d76bcdc05f50e03667447f6069445 (diff)
downloadfocaccia-qemu-8714d366e7e29d3ca8cebc8504e18c4cd7b5cf48.tar.gz
focaccia-qemu-8714d366e7e29d3ca8cebc8504e18c4cd7b5cf48.zip
util/error: expose Error definition to Rust code
This is used to preserve the file and line in a roundtrip from
C Error to Rust and back to C.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qapi/error-internal.h')
-rw-r--r--include/qapi/error-internal.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/qapi/error-internal.h b/include/qapi/error-internal.h
new file mode 100644
index 0000000000..d5c3904ade
--- /dev/null
+++ b/include/qapi/error-internal.h
@@ -0,0 +1,26 @@
+/*
+ * QEMU Error Objects - struct definition
+ *
+ * Copyright IBM, Corp. 2011
+ * Copyright (C) 2011-2015 Red Hat, Inc.
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Markus Armbruster <armbru@redhat.com>,
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2.  See
+ * the COPYING.LIB file in the top-level directory.
+ */
+
+#ifndef QAPI_ERROR_INTERNAL_H
+
+struct Error
+{
+    char *msg;
+    ErrorClass err_class;
+    const char *src, *func;
+    int line;
+    GString *hint;
+};
+
+#endif