diff --git a/util/log.c b/util/log.c index 2ee1500beedf9630f162454a38333e46b23953b9..ed3029fe5c43e860aa1c0c3808db05aae8ff3a72 100644 --- a/util/log.c +++ b/util/log.c @@ -34,6 +34,12 @@ int qemu_loglevel; static int log_append = 0; static GArray *debug_regions; +#ifdef CONFIG_DISABLE_QEMU_LOG +int qemu_log(const char *fmt, ...) +{ + return 0; +} +#else /* Return the number of characters emitted. */ int qemu_log(const char *fmt, ...) { @@ -56,6 +62,7 @@ int qemu_log(const char *fmt, ...) rcu_read_unlock(); return ret; } +#endif static void __attribute__((__constructor__)) qemu_logfile_init(void) {