From patchwork Fri Feb 8 12:15:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 219124 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7C5282C0086 for ; Fri, 8 Feb 2013 23:16:15 +1100 (EST) Received: from localhost ([::1]:50743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3msH-0000OV-IA for incoming@patchwork.ozlabs.org; Fri, 08 Feb 2013 07:16:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3ms0-0000O6-8v for qemu-devel@nongnu.org; Fri, 08 Feb 2013 07:15:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3mrw-0007AL-Tc for qemu-devel@nongnu.org; Fri, 08 Feb 2013 07:15:56 -0500 Received: from oxygen.pond.sub.org ([2a01:4f8:121:10e4::3]:38995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3mrw-00079j-N5; Fri, 08 Feb 2013 07:15:52 -0500 Received: from blackfin.pond.sub.org (p5B32B25A.dip.t-dialin.net [91.50.178.90]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 2383B9FE4A; Fri, 8 Feb 2013 13:15:49 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 67502200AC; Fri, 8 Feb 2013 13:15:49 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Fri, 8 Feb 2013 13:15:44 +0100 Message-Id: <1360325749-1989-2-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1360325749-1989-1-git-send-email-armbru@redhat.com> References: <1360325749-1989-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:4f8:121:10e4::3 Cc: qemu-trivial@nongnu.org Subject: [Qemu-devel] [PATCH for-1.4 1/6] error: Clean up error strings with embedded newlines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The arguments of error_report() should yield a short error string without newlines. A few places try to print additional help after the error message by embedding newlines in the error string. That's nice, but let's do it the right way. Signed-off-by: Markus Armbruster --- hw/kvm/pci-assign.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 896cfe8..c31a7f2 100644 --- a/hw/kvm/pci-assign.c +++ b/hw/kvm/pci-assign.c @@ -936,8 +936,8 @@ retry: /* Retry with host-side MSI. There might be an IRQ conflict and * either the kernel or the device doesn't support sharing. */ error_report("Host-side INTx sharing not supported, " - "using MSI instead.\n" - "Some devices do not to work properly in this mode."); + "using MSI instead"); + error_printf("Some devices do not to work properly in this mode."); dev->features |= ASSIGNED_DEVICE_PREFER_MSI_MASK; goto retry; } @@ -1903,10 +1903,10 @@ static void assigned_dev_load_option_rom(AssignedDevice *dev) memset(ptr, 0xff, st.st_size); if (!fread(ptr, 1, st.st_size, fp)) { - error_report("pci-assign: Cannot read from host %s\n" - "\tDevice option ROM contents are probably invalid " + error_report("pci-assign: Cannot read from host %s", rom_file); + error_printf("\tDevice option ROM contents are probably invalid " "(check dmesg).\n\tSkip option ROM probe with rombar=0, " - "or load from file with romfile=", rom_file); + "or load from file with romfile=\n"); memory_region_destroy(&dev->dev.rom); goto close_rom; }