From patchwork Mon Feb 11 16:41:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 14736 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 3354423E33 for ; Mon, 11 Feb 2013 16:41:34 +0000 (UTC) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by fiordland.canonical.com (Postfix) with ESMTP id 886CAA192AA for ; Mon, 11 Feb 2013 16:41:33 +0000 (UTC) Received: by mail-vb0-f51.google.com with SMTP id fq11so3779429vbb.24 for ; Mon, 11 Feb 2013 08:41:33 -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=62E2GI+0PZLyi/hD1IA0qw8X7+8tXgqbDZpMVeemWHA=; b=BPNdI85Gazy2PAylUq38L39tTnSbyxWMZY0Svv5Qrd6NNWqM+B5aDve4Oz/4EvN1MM 0LQWLx0jAW1oIQYP4JoSWGJSEJXM9NTUMg0q56mFfqQkoMj8KY/rvPZ95bo4/UgNc2cv efqYDLK1KY5s8Fnk2sPPGpzHoFcxsXe/q/KKjTCnerA1iphEIsX7di/gpTruu45MhDE2 B5OScN2LDAWbGYmzYcc3QnHV8z2TOBUJ4AMFuqLi1xRoBd4ztVFT2GZ5RuesfWQllrM/ cdPLJyZxMVXXI5NqK9jBZhUniMbNYXr4cblSH/4uwWfPTSQ4bEtZVziUxt7bLKzlMnkg BNhg== X-Received: by 10.52.38.234 with SMTP id j10mr6328881vdk.0.1360600893050; Mon, 11 Feb 2013 08:41:33 -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 zo8csp106478vec; Mon, 11 Feb 2013 08:41:32 -0800 (PST) X-Received: by 10.14.183.67 with SMTP id p43mr51548090eem.10.1360600889823; 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 u6si30352500eel.121.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 1U4wRa-0001oC-4S; Mon, 11 Feb 2013 16:41:26 +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 6/6] qemu-log: Rename CPULogItem, cpu_log_items to QEMULogItem, qemu_log_items Date: Mon, 11 Feb 2013 16:41:25 +0000 Message-Id: <1360600885-6917-7-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: ALoCoQkWROJaaK4KZdfww8sRLrdSqFEgXM86W8jaIxbY/f5FuWcUhtRCDCexxfMlL6buOw1rCvmg Rename the typedef CPULogItem and the public array cpu_log_items to names that better reflect the fact that the qemu_log functionality isn't restricted to TCG CPU debug logs any more. Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber --- include/qemu/log.h | 6 +++--- monitor.c | 4 ++-- qemu-log.c | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/qemu/log.h b/include/qemu/log.h index 5dcbe11..5a46555 100644 --- a/include/qemu/log.h +++ b/include/qemu/log.h @@ -135,13 +135,13 @@ static inline void qemu_log_try_set_file(FILE *f) } /* define log items */ -typedef struct CPULogItem { +typedef struct QEMULogItem { int mask; const char *name; const char *help; -} CPULogItem; +} QEMULogItem; -extern const CPULogItem cpu_log_items[]; +extern const QEMULogItem qemu_log_items[]; /* This is the function that actually does the work of * changing the log level; it should only be accessed via diff --git a/monitor.c b/monitor.c index 6aac4c2..6a0f257 100644 --- a/monitor.c +++ b/monitor.c @@ -721,10 +721,10 @@ static void help_cmd(Monitor *mon, const char *name) } else { help_cmd_dump(mon, mon_cmds, "", name); if (name && !strcmp(name, "log")) { - const CPULogItem *item; + const QEMULogItem *item; monitor_printf(mon, "Log items (comma separated):\n"); monitor_printf(mon, "%-10s %s\n", "none", "remove all logs"); - for(item = cpu_log_items; item->mask != 0; item++) { + for (item = qemu_log_items; item->mask != 0; item++) { monitor_printf(mon, "%-10s %s\n", item->name, item->help); } } diff --git a/qemu-log.c b/qemu-log.c index a96db88..2f47aaf 100644 --- a/qemu-log.c +++ b/qemu-log.c @@ -97,7 +97,7 @@ void qemu_set_log_filename(const char *filename) qemu_set_log(qemu_loglevel); } -const CPULogItem cpu_log_items[] = { +const QEMULogItem qemu_log_items[] = { { CPU_LOG_TB_OUT_ASM, "out_asm", "show generated host assembly code for each compiled TB" }, { CPU_LOG_TB_IN_ASM, "in_asm", @@ -138,7 +138,7 @@ static int cmp1(const char *s1, int n, const char *s2) /* takes a comma separated list of log masks. Return 0 if error. */ int qemu_str_to_log_mask(const char *str) { - const CPULogItem *item; + const QEMULogItem *item; int mask; const char *p, *p1; @@ -150,11 +150,11 @@ int qemu_str_to_log_mask(const char *str) p1 = p + strlen(p); } if (cmp1(p,p1-p,"all")) { - for (item = cpu_log_items; item->mask != 0; item++) { + for (item = qemu_log_items; item->mask != 0; item++) { mask |= item->mask; } } else { - for (item = cpu_log_items; item->mask != 0; item++) { + for (item = qemu_log_items; item->mask != 0; item++) { if (cmp1(p, p1 - p, item->name)) { goto found; } @@ -173,9 +173,9 @@ int qemu_str_to_log_mask(const char *str) void qemu_print_log_usage(FILE *f) { - const CPULogItem *item; + const QEMULogItem *item; fprintf(f, "Log items (comma separated):\n"); - for (item = cpu_log_items; item->mask != 0; item++) { + for (item = qemu_log_items; item->mask != 0; item++) { fprintf(f, "%-10s %s\n", item->name, item->help); } }