]> git.proxmox.com Git - qemu.git/commitdiff
qemu-log: Rename the public-facing cpu_set_log function to qemu_set_log
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 11 Feb 2013 16:41:23 +0000 (16:41 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 16 Feb 2013 10:44:44 +0000 (10:44 +0000)
Rename the public-facing function cpu_set_log to qemu_set_log. This
requires us to rename the internal-only qemu_set_log() to
do_qemu_set_log().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
bsd-user/main.c
cpus.c
hw/ppc.c
include/qemu/log.h
linux-user/main.c
monitor.c
qemu-log.c
target-i386/translate.c
tcg/tci/tcg-target.c

index 4b12e655b1fa1f862c46d1b680427a914a09fe0e..097fbfe4320ee9e7359dff321852c716da585608 100644 (file)
@@ -870,7 +870,7 @@ int main(int argc, char **argv)
             qemu_print_log_usage(stdout);
             exit(1);
         }
-        cpu_set_log(mask);
+        qemu_set_log(mask);
     }
 
     if (optind >= argc) {
diff --git a/cpus.c b/cpus.c
index 63cfb73613be5a410485d710b20b2f7827308d3a..24e6affbf78d4801568e760025bb08bf25eddfcb 100644 (file)
--- a/cpus.c
+++ b/cpus.c
@@ -1184,7 +1184,7 @@ void set_cpu_log(const char *optarg)
         qemu_print_log_usage(stdout);
         exit(1);
     }
-    cpu_set_log(mask);
+    qemu_set_log(mask);
 }
 
 void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
index c52e22f708ebede0ed9665dfe6af386b2c193cdc..6053bd56522a4887b49b6ad38760bfade3b9675d 100644 (file)
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -1189,7 +1189,7 @@ void PPC_debug_write (void *opaque, uint32_t addr, uint32_t val)
         break;
     case 2:
         printf("Set loglevel to %04" PRIx32 "\n", val);
-        cpu_set_log(val | 0x100);
+        qemu_set_log(val | 0x100);
         break;
     }
 }
index 10792ce0d137d42bac027bf99d23dd916c64626f..5dcbe11d4754381d61d5c62ca585a8d877417946 100644 (file)
@@ -143,14 +143,18 @@ typedef struct CPULogItem {
 
 extern const CPULogItem cpu_log_items[];
 
-void qemu_set_log(int log_flags, bool use_own_buffers);
+/* This is the function that actually does the work of
+ * changing the log level; it should only be accessed via
+ * the qemu_set_log() wrapper.
+ */
+void do_qemu_set_log(int log_flags, bool use_own_buffers);
 
-static inline void cpu_set_log(int log_flags)
+static inline void qemu_set_log(int log_flags)
 {
 #ifdef CONFIG_USER_ONLY
-    qemu_set_log(log_flags, true);
+    do_qemu_set_log(log_flags, true);
 #else
-    qemu_set_log(log_flags, false);
+    do_qemu_set_log(log_flags, false);
 #endif
 }
 
index 862619b43854114494eeff9bf22d37486f3a313e..146a4683a50953b4a9561ac037dc6038ca9e2dd5 100644 (file)
@@ -3104,7 +3104,7 @@ static void handle_arg_log(const char *arg)
         qemu_print_log_usage(stdout);
         exit(1);
     }
-    cpu_set_log(mask);
+    qemu_set_log(mask);
 }
 
 static void handle_arg_log_filename(const char *arg)
index 2a55d566861f7f852341292d24641dc55a7a07e9..6aac4c20bdd242aaaa71afd76f5aaa8afd9710dd 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -981,7 +981,7 @@ static void do_log(Monitor *mon, const QDict *qdict)
             return;
         }
     }
-    cpu_set_log(mask);
+    qemu_set_log(mask);
 }
 
 static void do_singlestep(Monitor *mon, const QDict *qdict)
index 10a8581f1f9fdd762e2976ee13e017eaa5c61082..a96db882b35f50513d8a8eb95905a7e2af47d407 100644 (file)
@@ -54,7 +54,7 @@ void qemu_log_mask(int mask, const char *fmt, ...)
 }
 
 /* enable or disable low levels log */
-void qemu_set_log(int log_flags, bool use_own_buffers)
+void do_qemu_set_log(int log_flags, bool use_own_buffers)
 {
     const char *fname = logfilename ?: DEFAULT_LOGFILENAME;
 
@@ -94,7 +94,7 @@ void qemu_set_log_filename(const char *filename)
         fclose(qemu_logfile);
         qemu_logfile = NULL;
     }
-    cpu_set_log(qemu_loglevel);
+    qemu_set_log(qemu_loglevel);
 }
 
 const CPULogItem cpu_log_items[] = {
index 32d21f52d02afb2661319f94d4b16168bc0f84b5..112c3102a07089f65ae833c474651d0622363917 100644 (file)
@@ -6854,7 +6854,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
 #else
         /* start debug */
         tb_flush(env);
-        cpu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM);
+        qemu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM);
 #endif
         break;
 #endif
index 1707169ea8cf3a0f5f6e1f9864a04ecf48f9500f..2d561b32e16024f9182967c0d0ab5f0b5ac8018c 100644 (file)
@@ -888,7 +888,7 @@ static void tcg_target_init(TCGContext *s)
 #if defined(CONFIG_DEBUG_TCG_INTERPRETER)
     const char *envval = getenv("DEBUG_TCG");
     if (envval) {
-        cpu_set_log(strtol(envval, NULL, 0));
+        qemu_set_log(strtol(envval, NULL, 0));
     }
 #endif