mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
@@ -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
|
||||
@@ -60,6 +60,7 @@ typedef enum memory_order {
|
||||
#include "hw/qdev-properties-system.h"
|
||||
#include "hw/irq.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/error-internal.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "chardev/char-serial.h"
|
||||
#include "exec/memattrs.h"
|
||||
|
||||
+1
-9
@@ -15,15 +15,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
struct Error
|
||||
{
|
||||
char *msg;
|
||||
ErrorClass err_class;
|
||||
const char *src, *func;
|
||||
int line;
|
||||
GString *hint;
|
||||
};
|
||||
#include "qapi/error-internal.h"
|
||||
|
||||
Error *error_abort;
|
||||
Error *error_fatal;
|
||||
|
||||
Reference in New Issue
Block a user