From eff4de6e25cd6bfe7d71d3bb66b985207363b8b4 Mon Sep 17 00:00:00 2001 From: Chen Qun Date: Fri, 11 Feb 2022 18:20:59 +0800 Subject: [PATCH 1/3] util/log: add CONFIG_DISABLE_QEMU_LOG macro Using CONFIG_DISABLE_QEMU_LOG macro to control qemu_log function. Signed-off-by: Yan Wang --- ...og-add-CONFIG_DISABLE_QEMU_LOG-macro.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 util-log-add-CONFIG_DISABLE_QEMU_LOG-macro.patch diff --git a/util-log-add-CONFIG_DISABLE_QEMU_LOG-macro.patch b/util-log-add-CONFIG_DISABLE_QEMU_LOG-macro.patch new file mode 100644 index 0000000..f6940d6 --- /dev/null +++ b/util-log-add-CONFIG_DISABLE_QEMU_LOG-macro.patch @@ -0,0 +1,41 @@ +From 05462305ec8b9ce5b414ede1e7e680b16d1a08ad Mon Sep 17 00:00:00 2001 +From: Yan Wang +Date: Fri, 11 Feb 2022 18:20:59 +0800 +Subject: [PATCH] util/log: add CONFIG_DISABLE_QEMU_LOG macro + +Using CONFIG_DISABLE_QEMU_LOG macro to control +qemu_log function. + +Signed-off-by: Yan Wang +--- + util/log.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/util/log.c b/util/log.c +index 2ee1500bee..ed3029fe5c 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) + { +-- +2.27.0 + -- Gitee From eb576f5367bce74c3134c8cbcb2673f664008211 Mon Sep 17 00:00:00 2001 From: Chen Qun Date: Sat, 12 Feb 2022 14:52:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?spec:=20Update=20patch=20and=20changelog=20?= =?UTF-8?q?with=20!245=20=E3=80=906.2.0=E3=80=91=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=A7=E5=88=B6qemu=5Flog=E5=87=BD=E6=95=B0=E7=9A=84?= =?UTF-8?q?=E5=AE=8F=20=20!245?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit util/log: add CONFIG_DISABLE_QEMU_LOG macro Signed-off-by: Chen Qun --- qemu.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qemu.spec b/qemu.spec index b52cf7b..f5a11e5 100644 --- a/qemu.spec +++ b/qemu.spec @@ -78,6 +78,7 @@ Patch0065: freeclock-set-rtc_date_diff-for-X86.patch Patch0066: hw-usb-reduce-the-vpcu-cost-of-UHCI-when-VNC-disconn.patch Patch0067: hw-net-rocker-fix-security-vulnerability.patch Patch0068: tests-Disable-filemonitor-testcase.patch +Patch0069: util-log-add-CONFIG_DISABLE_QEMU_LOG-macro.patch BuildRequires: flex BuildRequires: gcc @@ -522,6 +523,9 @@ getent passwd qemu >/dev/null || \ %endif %changelog +* Sat Feb 12 2022 Chen Qun +- util/log: add CONFIG_DISABLE_QEMU_LOG macro + * Fri Feb 11 2022 Chen Qun - hw/net/rocker: fix security vulnerability - tests: Disable filemonitor testcase -- Gitee From 738b89bbea9599d21acc4037e9902bea6222df70 Mon Sep 17 00:00:00 2001 From: Chen Qun Date: Sat, 12 Feb 2022 14:52:32 +0800 Subject: [PATCH 3/3] spec: Update release version with !245 increase release verison by one Signed-off-by: Chen Qun --- qemu.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu.spec b/qemu.spec index f5a11e5..05326f7 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,6 +1,6 @@ Name: qemu Version: 6.2.0 -Release: 9 +Release: 10 Epoch: 2 Summary: QEMU is a generic and open source machine emulator and virtualizer License: GPLv2 and BSD and MIT and CC-BY-SA-4.0 -- Gitee