From patchwork Mon Feb 11 16:41:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 14737 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id F3E5A23E33 for ; Mon, 11 Feb 2013 16:41:35 +0000 (UTC) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by fiordland.canonical.com (Postfix) with ESMTP id 75CB3A1893C for ; Mon, 11 Feb 2013 16:41:35 +0000 (UTC) Received: by mail-ve0-f180.google.com with SMTP id jx10so5141463veb.25 for ; Mon, 11 Feb 2013 08:41:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=12TnwzjgS1ORGO6vMVOPBUJcTfrjZl7ffK2o+lk8sQc=; b=XuvWeiNvDPuVpwqxnCIr/kJb8D0711VzSRxX030xqhrrrB30XhVuk+YashDyv/nTTC NHvA8Yxpy2ze1KkCVsc+5byRi576O4OjkCU6HoqYhVS9SAtmQr2vixJletRlZNM8Rzhf /9OzonJOhFmPGESjv9F16Y/DTQltReXq7AUylak29/lbRy9227UmYkl+L5Oio124ntz1 Dn554gISp8jTAWWVyxnlJ18y1y5otekOAOS/+ZiSDpIngvxgP/lx5cFX6NmNMbRRlUtw Hg77hVzZKwsY4sYXt7Slc1HuslRQdMaEPdxcmKNBXlHG6mgsgxkzdKqHm+wUvgmETeZu TOeA== X-Received: by 10.52.24.98 with SMTP id t2mr16986252vdf.69.1360600894014; Mon, 11 Feb 2013 08:41:34 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp106481vec; Mon, 11 Feb 2013 08:41:33 -0800 (PST) X-Received: by 10.204.11.87 with SMTP id s23mr4264723bks.113.1360600889742; Mon, 11 Feb 2013 08:41:29 -0800 (PST) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id iq9si29203903bkc.50.2013.02.11.08.41.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 11 Feb 2013 08:41:29 -0800 (PST) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1U4wRZ-0001o2-UF; Mon, 11 Feb 2013 16:41:25 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Stefan Hajnoczi Subject: [PATCH 1/6] qemu-log: Unify {cpu_set, set_cpu}_log_filename as qemu_set_log_filename Date: Mon, 11 Feb 2013 16:41:20 +0000 Message-Id: <1360600885-6917-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1360600885-6917-1-git-send-email-peter.maydell@linaro.org> References: <1360600885-6917-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQktni4945qhTLfY7EenudPhKXeSehT9XPup1RsxNU4InZSOphgjqmCVgBd5BLXCRlE5bKlN The qemu_log() functionality is no longer specific to TCG CPU debug logs. Rename cpu_set_log_filename() to qemu_set_log_filename() and drop the pointless wrapper set_cpu_log_filename(). Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber --- bsd-user/main.c | 2 +- cpus.c | 5 ----- include/qemu/log.h | 2 +- include/sysemu/cpus.h | 1 - linux-user/main.c | 4 ++-- monitor.c | 2 +- qemu-log.c | 2 +- vl.c | 2 +- 8 files changed, 7 insertions(+), 13 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index ae24723..76ab359 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -861,7 +861,7 @@ int main(int argc, char **argv) } /* init debug */ - cpu_set_log_filename(log_file); + qemu_set_log_filename(log_file); if (log_mask) { int mask; const CPULogItem *item; diff --git a/cpus.c b/cpus.c index 41779eb..2155441 100644 --- a/cpus.c +++ b/cpus.c @@ -1191,11 +1191,6 @@ void set_cpu_log(const char *optarg) cpu_set_log(mask); } -void set_cpu_log_filename(const char *optarg) -{ - cpu_set_log_filename(optarg); -} - void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg) { /* XXX: implement xxx_cpu_list for targets that still miss it */ diff --git a/include/qemu/log.h b/include/qemu/log.h index 58f69cb..4760e04 100644 --- a/include/qemu/log.h +++ b/include/qemu/log.h @@ -154,7 +154,7 @@ static inline void cpu_set_log(int log_flags) #endif } -void cpu_set_log_filename(const char *filename); +void qemu_set_log_filename(const char *filename); int cpu_str_to_log_mask(const char *str); #endif diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h index f7f6854..60e44bb 100644 --- a/include/sysemu/cpus.h +++ b/include/sysemu/cpus.h @@ -25,7 +25,6 @@ extern int smp_threads; void set_numa_modes(void); void set_cpu_log(const char *optarg); -void set_cpu_log_filename(const char *optarg); void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg); #endif diff --git a/linux-user/main.c b/linux-user/main.c index 3df8aa2..99219ef 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3113,7 +3113,7 @@ static void handle_arg_log(const char *arg) static void handle_arg_log_filename(const char *arg) { - cpu_set_log_filename(arg); + qemu_set_log_filename(arg); } static void handle_arg_set_env(const char *arg) @@ -3480,7 +3480,7 @@ int main(int argc, char **argv, char **envp) #endif /* init debug */ - cpu_set_log_filename(log_file); + qemu_set_log_filename(log_file); optind = parse_args(argc, argv); /* Zero out regs */ diff --git a/monitor.c b/monitor.c index 20bd19b..578a318 100644 --- a/monitor.c +++ b/monitor.c @@ -964,7 +964,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict, static void do_logfile(Monitor *mon, const QDict *qdict) { - cpu_set_log_filename(qdict_get_str(qdict, "filename")); + qemu_set_log_filename(qdict_get_str(qdict, "filename")); } static void do_log(Monitor *mon, const QDict *qdict) diff --git a/qemu-log.c b/qemu-log.c index 30c9ab0..9a7e567 100644 --- a/qemu-log.c +++ b/qemu-log.c @@ -86,7 +86,7 @@ void qemu_set_log(int log_flags, bool use_own_buffers) } } -void cpu_set_log_filename(const char *filename) +void qemu_set_log_filename(const char *filename) { g_free(logfilename); logfilename = g_strdup(filename); diff --git a/vl.c b/vl.c index a8dc73d..06e5369 100644 --- a/vl.c +++ b/vl.c @@ -3861,7 +3861,7 @@ int main(int argc, char **argv, char **envp) */ if (log_mask) { if (log_file) { - set_cpu_log_filename(log_file); + qemu_set_log_filename(log_file); } set_cpu_log(log_mask); }