From 8714d366e7e29d3ca8cebc8504e18c4cd7b5cf48 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 23 May 2025 19:41:40 +0200 Subject: 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 --- include/qapi/error-internal.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/qapi/error-internal.h (limited to 'include/qapi/error-internal.h') 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 + * Markus Armbruster , + * + * 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 -- cgit 1.4.1