From 0572f558cbc45acdd13ae3548c06ce650641f292 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 27 Oct 2020 04:58:26 -0400 Subject: plugin: propagate errors qemu_finish_machine_init currently can only exit QEMU if it fails. Prepare for giving it proper error propagation, and possibly for adding a plugin_add monitor command that calls an accelerator method. While at it, make all errors from plugin_load look the same. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- linux-user/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'linux-user') diff --git a/linux-user/main.c b/linux-user/main.c index 24d1eb7..750a011 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -671,9 +671,7 @@ int main(int argc, char **argv, char **envp) exit(1); } trace_init_file(); - if (qemu_plugin_load_list(&plugins)) { - exit(1); - } + qemu_plugin_load_list(&plugins, &error_fatal); /* Zero out regs */ memset(regs, 0, sizeof(struct target_pt_regs)); -- cgit v1.1 From 36c5e0b8efb7a54b1cecca05de55a49ab91ac6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 10 Dec 2020 17:47:51 +0400 Subject: linux-user: remove GNUC check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QEMU requires Clang or GCC, that define and support __GNUC__ extensions. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201210134752.780923-13-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- linux-user/strace.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'linux-user') diff --git a/linux-user/strace.c b/linux-user/strace.c index 11fea14..e00275f 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -24,7 +24,6 @@ struct syscallname { abi_long, abi_long, abi_long); }; -#ifdef __GNUC__ /* * It is possible that target doesn't have syscall that uses * following flags but we don't want the compiler to warn @@ -32,9 +31,6 @@ struct syscallname { * functions. It is ok to keep them while not used. */ #define UNUSED __attribute__ ((unused)) -#else -#define UNUSED -#endif /* * Structure used to translate flag values into strings. This is -- cgit v1.1