util/error: make func optional

The function name is not available in Rust, so make it optional.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2025-05-28 14:27:47 +02:00
parent 230a4894f4
commit e8fb9c91a3
2 changed files with 9 additions and 2 deletions

View file

@ -18,6 +18,8 @@ struct Error
{
char *msg;
ErrorClass err_class;
/* Used for error_abort only, may be NULL. */
const char *func;
/*