From patchwork Fri Sep 1 16:51:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 808829 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="0PDGqMB3"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xkQNY0fHzz9t2x for ; Sat, 2 Sep 2017 02:55:41 +1000 (AEST) Received: from localhost ([::1]:50044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpEJ-0005q4-5F for incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 12:55:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpDh-0005oX-9S for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnpDc-00063C-DN for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:01 -0400 Received: from mail-bn3nam01on0076.outbound.protection.outlook.com ([104.47.33.76]:19424 helo=NAM01-BN3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnpDc-00062y-7F for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:54:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ws9jIhRkxTgskZV/DyXmAidbISqzsJ7U4VsTeI5SqnU=; b=0PDGqMB3mKpqYuraif5Ytmx7bmfSgcZ6C9vnyCPyUmDK1wnT6e3F9ULCAd7ds3v32dwr3V+fSNIkVu6a5V85C8akN/O9Adp/CwqWVKvP1WQ1IUfLt6mqFzA3ZWcNq12qj1QyBR/ev3mN5FZzoSGipTrC2E600lSK7O74DQwZ7Mo= Received: from BN6PR02CA0045.namprd02.prod.outlook.com (10.173.146.159) by SN1PR0201MB1933.namprd02.prod.outlook.com (10.163.87.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 1 Sep 2017 16:54:54 +0000 Received: from BL2NAM02FT050.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::204) by BN6PR02CA0045.outlook.office365.com (2603:10b6:404:5f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Fri, 1 Sep 2017 16:54:54 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT050.mail.protection.outlook.com (10.152.77.101) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Fri, 1 Sep 2017 16:54:53 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDZ-0002aG-2L; Fri, 01 Sep 2017 09:54:53 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dnpDY-0003eO-Vn; Fri, 01 Sep 2017 09:54:53 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v81Gsh0u028937; Fri, 1 Sep 2017 09:54:43 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDO-0003cF-Vj; Fri, 01 Sep 2017 09:54:43 -0700 From: Alistair Francis To: Date: Fri, 1 Sep 2017 09:51:05 -0700 Message-ID: <5bf40ca8376c537ac05dd848a84e072a88a1d939.1504228916.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23296.003 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(2980300002)(438002)(189002)(199003)(54906002)(5660300001)(5003940100001)(189998001)(15650500001)(110136004)(8936002)(50226002)(63266004)(2906002)(47776003)(9786002)(6666003)(6916009)(2950100002)(8676002)(77096006)(118296001)(478600001)(81156014)(81166006)(50986999)(36386004)(76176999)(36756003)(50466002)(626005)(48376002)(39060400002)(33646002)(4326008)(2351001)(356003)(106466001)(305945005)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0201MB1933; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT050; 1:D9m3FSmc11d1b632k6MzrYJcUlhogtFoZKfx1TsdAWVnirjvrA9Vzvrd4ePi8ivlnKgiegN4hyccfwLT6sFRsBTKzQ41cvDj43GkfKUuVymGFqXsH2YzjyC8bo0tzBjN MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4c098d5c-3929-43e1-b407-08d4f15a2b04 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR0201MB1933; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1933; 3:hHTfvPc0Endu/PGXyK8DnMguQYlAYOwEFKo1Jd5iKncsmw3we+uF7T41xBZQ3/dndwxbOD7c7PZn1Qsy7uyWmMsSEE3bmRqpNyVSzU8J4RNGeprBor+Cw3p3jkhDy+VD5t1me85GMqG4LoDAEuwRCdwb26hw4ozzGjFwpvatP2G1u43tbNFVxn1FQRIvynTPp1VGX+MQgO8cN4c7C5MGefnihcge4gGWKl72JgFgl+UrSwyvdMSpb5Aeubb4RACoLLshh0QK3R33Up40LIYdaovC6Tyah25JShg3mXt+1JQiIEkStCjnLP59buvO5W0SCerqrEmbRUloLwqqzQI/yFR4eSJbi3Lj1doTAQtLAg4=; 25:i9sOWmkJfjK0xQKYp2GUD3Ctev4nVZIBd1sykCuR8imGfLGAn1pmDDx3b2UuVcZ/YCTFXWrbWi+JvpHx9dP0uKjhnN+bI37+5t17CoVZ5q/nyOUkxJoRJoiz6FdNA2URNhlKJgAJp1ooWiHbL7J5eV4CszZdzV1ETGz16ea2a3ikwwg4V6gnhOEvUIDXfbCCYMmi5EWECadDafbeSzIXszcou5R1wfuSeUDDnqeCmsuzgf2fil7eV85pBuZJlYVnWWydbucbx5ZmfUiQb0TNId65eM+dKem3Kf07clEPhO8FeBKPmdlMzCckJJuVmt6SjWRuNUeFsXZF+h/GmY33tQ== X-MS-TrafficTypeDiagnostic: SN1PR0201MB1933: X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1933; 31:7t8JF2lfLoJc6LEGk3Zxi0+fIt1naSjAU+Tx65ZXsPgfSOBrqyAtgDaxT9FaMG8b5rs5lqHra4YI1OjbBWoeMIZtIUWT/aLUKxXqr9eGyZaZ3uyUG1abaD/WMe8r+jPhZt6vOSciptD50zbtpxECdajUcp2cEMRCVauO+tajJo8bJV/fsBUElsVpI3v3ygRBsAcdAdN3vT7RPJS04mYgnonNRuZvDv+/E+QcnH8clPc=; 20:8S5w3F6Gg3maNMgd3aowwpIUsD/Pmxktqtzl6igWEW+tLQTnJxCovwCKhyfCCjHW3MRDKLltwk7226JAHe5lQXaM/mFgoipoFUGPt5mvzpVML91OJKKah0GdHFD3BW76sInQQTvmcirWzSdEnbq/W/sx45n33EmfLhmaPF3ynyLQRQ9b4KZd5hKU+MMvKRXMdTJKN2Djl0ItvekLjbIr/JE/W01C4EeOfzJqaa14GO8X8B2TxSlt3C8Tkk/2iiGly2kXHEw40xjKrybab7ntCOk/jLYx6tiahlg292OCPx0tFOKMqHO1mAVZ9dAIDjAluazeUeakUhj+a5ZGvbybrX2g5xeV8y9xvKQrf/owt1XGAffacjni+E48Mr7f6eY+uDPI7xhNsjgkjKeP0AamekJeejIibxT7UvElQ5xxXH8MOAnTMi0sMsOFvtyInikVvUpR9Pdufjgs4HWUeAy10WzHTPx3GiU1x56fZut1uJyLNerzOgRXM1hgydlkebdd X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(13018025)(5005006)(13016025)(10201501046)(3002001)(93006095)(93004095)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123562025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0201MB1933; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0201MB1933; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1933; 4:HnRioy+Qc78VJyMgdPi6FcNabGh2CDhWmw7WQGH6KkRD64qB7I2p5D6n/EWYBX+sYslU5/AfI663zbD5D/vQNTxB80U2BFufbtitkQwRSYyIco5xVkhb2zLo0fN/T8FyIQkTwzBHAJSyGQw5IoJ2lqYmwG+gTARlXxhQbKpv0OiPsxBXipDLbV2M+tdsXlzs5YLlQi16QvCMdpw85slzEMtRbLlOyLMsx48JHrUooQnRYFw9vN34Rls/lD/muKoS9Ee9BacGTT2w/b4AYEKu6goG2BFzc09qhuPBskW5lD4= X-Forefront-PRVS: 0417A3FFD2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0201MB1933; 23:awFF5ltfG24kBYe4salddlzkDwNSooa3L0vl8wf?= 7vj4vcuSidkFEnBfIawWATlRglFunAFn8G3P1WcP3xD9wxPInqY6C1Efp5Woj13skYf5F1zayQ49QlLKFv2Q+WkT60BYqJ8F1qwpTkYiSO4EnInsYg8/N+tXOtvNy5Xcm94pPNWwyI0m2eVOcXcMaO136H3nHMVomG1ufM7YsyLwgynVnoYB+zpYrwh+wSNPipSds4P3wFb9/y6y2hz1iUOTN/k9lTHzr7009T8XX/z9TFeS7+FWKs8D/Fa4m/P8EY22mS42+WeyEGHGi1knM5zeKGsnOwOf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xU9+are/bDn7Kk/ED7qRaS98g078ZQ==; 5:CUMDPIecJWzpIkIFOjg7U3D1j0El6P+Heya0m9fgqaP0XwsLSdddwU7rCBvjV67CBSO036gPfUVGIqbpV2MkZEW1pPZ2Ebcd0pEcS0S+AqVJB3s5xXca17oJvo9MKQsV38hLYHPnlevgGkCTmTqJeQ==; 24:2xwc6IXS99fIcnJD1mSvUJLrw98mbLvFDcQSyPM7SNHncKinfDwUFDNS8Aov59+jwTlp8742jPDfwSRfYFgUv4r8CfAFHYMTUKksu3Qw/AU=; 7:dWqQ9i3scJ1q5B9g5yWIO03PEyV7ya52EwtI2xuiAD9UJjIYPcXxSfcjajwbdTRlQ4A6zcE+UUDJsou9gwSv4cmtVoUwDA5fFE/7ygHEyI0JA2V3FV0i0qM7Xfn8njdbk5rUaAlXNfv4MuAT9I9IliSg6BOGcGhV4OoxPj4kWu1ICK8u8JZBRpvphk1VDidNm5uHUFHjctbB2TEjCdPcaajv1Zo4HwWBlqk2YFTf4A0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2017 16:54:53.4661 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0201MB1933 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.33.76 Subject: [Qemu-devel] [PATCH v3 1/7] hw/i386: Improve some of the warning messages X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com, pbonzini@redhat.com, armbru@redhat.com, Eduardo Habkost , alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alistair Francis Suggested-by: Eduardo Habkost Cc: Eduardo Habkost --- V3: - Improve the messages hw/i386/acpi-build.c | 15 ++++++++++----- hw/i386/pc.c | 7 +++---- hw/i386/pc_q35.c | 8 +++++--- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 98dd424678..142bd6433c 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2780,17 +2780,22 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) ACPI_BUILD_ALIGN_SIZE); if (tables_blob->len > legacy_table_size) { /* Should happen only with PCI bridges and -M pc-i440fx-2.0. */ - warn_report("migration may not work."); + warn_report("ACPI table size %u exceeds %d bytes," + " migration may not work", + tables_blob->len, legacy_table_size); + error_printf("Try removing CPUs, NUMA nodes, memory slots" + " or PCI bridges."); } g_array_set_size(tables_blob, legacy_table_size); } else { /* Make sure we have a buffer in case we need to resize the tables. */ if (tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) { /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI tables are larger than 64k."); - warn_report("migration may not work."); - warn_report("please remove CPUs, NUMA nodes, " - "memory slots or PCI bridges."); + warn_report("ACPI table size %u exceeds %d bytes," + " migration may not work", + tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); + error_printf("Try removing CPUs, NUMA nodes, memory slots" + " or PCI bridges."); } acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); } diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 21081041d5..c882f8c2ea 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -384,7 +384,7 @@ ISADevice *pc_find_fdc0(void) warn_report("multiple floppy disk controllers with " "iobase=0x3f0 have been found"); error_printf("the one being picked for CMOS setup might not reflect " - "your intent\n"); + "your intent"); } return state.floppy; @@ -2098,9 +2098,8 @@ static void pc_machine_set_max_ram_below_4g(Object *obj, Visitor *v, } if (value < (1ULL << 20)) { - warn_report("small max_ram_below_4g(%"PRIu64 - ") less than 1M. BIOS may not work..", - value); + warn_report("Only %" PRIu64 " bytes of RAM below the 4GiB boundary," + "BIOS may not work with less than 1MiB", value); } pcms->max_ram_below_4g = value; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 169a214d50..435eb2c458 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -101,9 +101,11 @@ static void pc_q35_init(MachineState *machine) lowmem = pcms->max_ram_below_4g; if (machine->ram_size - lowmem > lowmem && lowmem & ((1ULL << 30) - 1)) { - warn_report("Large machine and max_ram_below_4g(%"PRIu64 - ") not a multiple of 1G; possible bad performance.", - pcms->max_ram_below_4g); + warn_report("Large machine as the ram size (0x%" PRIx64 ") is more" + " then twice the size of the internal limit" + " (0x%" PRIx64 ") and max-ram-below-4g (%"PRIu64")" + " note a multiple of 1G; possible bad performance.", + machine->ram_size, lowmem, pcms->max_ram_below_4g); } } From patchwork Fri Sep 1 16:51:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 808832 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="lU3PgJ7I"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xkQRB3L8Nz9t2x for ; Sat, 2 Sep 2017 02:57:58 +1000 (AEST) Received: from localhost ([::1]:50084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpGW-0008M4-GE for incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 12:57:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpDh-0005oS-6z for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnpDe-00064s-4e for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:01 -0400 Received: from mail-sn1nam02on0070.outbound.protection.outlook.com ([104.47.36.70]:33429 helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnpDd-00063S-TT for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:54:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=MngO1XZlN6cpe5g4/9Hq1wvXSVXXx2BTnG5xmOqQppo=; b=lU3PgJ7IGCd91h0Z9SlO7IOgpTr8XBXaKLl7qGFT6ILKquiQsfzvhUHkRYt4Uq+p/nwnI8J7y9q9pW4CuyT43aYw1PW2fokg+9H5qxA+bmmtPyQmyQPRUIhVEphhKJbTlx18hBF6m2yoJznEtHH08eQy1mFdoYScwwt3nUUQzIk= Received: from MWHPR0201CA0077.namprd02.prod.outlook.com (10.167.161.18) by CY1PR02MB1135.namprd02.prod.outlook.com (10.163.15.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 1 Sep 2017 16:54:55 +0000 Received: from BL2NAM02FT056.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::206) by MWHPR0201CA0077.outlook.office365.com (2603:10b6:301:75::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Fri, 1 Sep 2017 16:54:54 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT056.mail.protection.outlook.com (10.152.77.221) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Fri, 1 Sep 2017 16:54:53 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:56996 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDZ-0000PN-48; Fri, 01 Sep 2017 09:54:53 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dnpDZ-0003eO-16; Fri, 01 Sep 2017 09:54:53 -0700 Received: from xsj-pvapsmtp01 (smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v81GsmkQ028953; Fri, 1 Sep 2017 09:54:48 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDU-0003dG-7N; Fri, 01 Sep 2017 09:54:48 -0700 From: Alistair Francis To: Date: Fri, 1 Sep 2017 09:51:09 -0700 Message-ID: <00d2599b6df0e4a0b57b8836c6ec1c39f97d71be.1504228916.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23296.003 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(2980300002)(438002)(199003)(189002)(626005)(305945005)(4326008)(76176999)(50986999)(8936002)(77096006)(106466001)(2351001)(63266004)(189998001)(118296001)(39060400002)(33646002)(5003940100001)(50226002)(478600001)(2950100002)(6916009)(7416002)(5660300001)(2906002)(6666003)(110136004)(356003)(36386004)(36756003)(47776003)(50466002)(48376002)(8676002)(54906002)(81156014)(81166006)(9786002)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR02MB1135; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT056; 1:r7+vQFFRIS6fiRojZSvhcn/cr+F77MwaFoFwiezxiQ5iJ2MEAIY9xLEmAnVsx6V8Z4EBLjCEPizMVklzNoqbgmsL4HwoUKtB7GPz1r6MXi+WbYWmbtB1OUkRY5aTOKty MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 20a39f3e-5436-4695-b620-08d4f15a2b54 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR02MB1135; X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1135; 3:3xGDgbbzWzBWGXbgvQkT7zReAW2AVnZvAynHL5Ts1qBeKvvAEfCQI0kWa2UMi/xSWiNvBsByMzow3ld86BAhHllniIQ/UlE5F4aJx2YK2BJnW6hYdEQM7XwM3P1OiKTT2tOWEnYjqJNo1R2va0eyPqE9k8/QO7Iqkp0JvywigrLGc4nXFNJSJ7J0AB1azgtGjl5uQCTIEJjFeL2UVoDTcnirtQPVD+9Y0hGqNXgpTB4sdRyibJliBC9AkRRAmJa7yyHzWeJ5meqwivI2DZ+syM3R9oCkbzoxSwHFcOSnec/WgQ5pia3R759aSKVeEEeCZqpqnSW/xGF+bXeb5cp3ux4EN7E1kjORAzIez+aJ0pw=; 25:s6XeYELP86GGq7Gc+f8zIZj1SpWVDibp4SN+ERZQFH9+yBP7tx0IiNJiftKgGrSRpPOUZ3k5zxiDrnm6AyArlIbp9y4Gw9OrFwG/ArAxYYj6U4DDeOlUuUhgv3cZ6DJ+xq77nHR49o6Wu6thktF7ZYbR0GJd051jC6vxk9QxOQyndtA3p+jCIv48sa33S4qSmq8qI+5b5iRFuDWZuQ9vUuKF6NePurlWHIUEuY53iJFd/1DlqBJqjaFVgpO19muDwRxlT4J3WBR7Z8kmcbzzm0Rzus1kj1bd7BugxFL17AgLa1T2JPwmbt1FgERfGEA2ncuBcopuR3FCKjo1BrIItg== X-MS-TrafficTypeDiagnostic: CY1PR02MB1135: X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1135; 31:LOTlmbSAJIeGEUIrAEi3xCxAUbMYhaNIVVppIHS8iEorGCvxPaWRx6EhmT2nZP/V+x0VFhPBLUg5DF19DHV+9mYgHszDNAp8Pn80eODxUksIk3tejPGY6OtMQxoeA89dJuvq1A7wdUQ+g728UZ3aJLfQVr1knVqH/jSWgEmwh6DD7hyJbjyKnS5EmHUrFF+aKbMdqQzORGA7bh7ko1oVN8ysN8oDZMeaMEhR6Kr6grQ=; 20:e9HfvgobAYM17AAHASdjxeF11euH6zC3QaDk0c8ArurZ2/oqHlnIav/NQSP5R9TuNQJRzGoyPVpWdse4Vrh7dKmrTVuHfTECrssOs+fVh7Gi1XZE++cTKjI3Icv/kSsbSQQecMSR6h03ZJH4yuncOJJgBqCswgvYpqhU3H3xtet9xtTE2nmk4/KybfB6GidR7jruHdRCWB/0c0vK0aO0rImXR6ir0DT9YgDdYNJtqSkLklWQR/AzcofNvQupBts7hrfzvIWfdaV7rgace5xB8iUS1GTArLthrXSh2c7YyEYz49XD7Tnf6dX/eHx4MB7FPgqolKyxr1pLhlaFkfE9Xxsot4Mq1GvV5htO88TsMMkfjO3+hHIjs9xABUnyaY9WS9xRQUBA4dfbOU4r0DzPAhJQPbKnEp4xl593YZsNPdUtr1HZc5n5+E7M3ESz+vhCtWtZkploVPGdUy4D9LJXWbfqjM0mOBIXPb/mRBv5v2+zEwLlSz2qBWbCxEJpgRpW X-Exchange-Antispam-Report-Test: UriScan:(190383065149520)(192813158149592)(104084551191319); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(3002001)(10201501046)(93006095)(93004095)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR02MB1135; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR02MB1135; X-Microsoft-Exchange-Diagnostics: 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1sB2PQH6ZlEQyc6cZbTu8uo=; 7:U+dT4YBtr8zmng1YocOOtKdzY3B7vNwMxd2BiC7ebfm9MbiL+oXny1LuKC///MzDuUv7Xqbshcx4ZmoVKliHtDMkLCEdJjbuUw/l3J7Rq6q956/WqO2pEidnQikEoAtwemtzACQvZe6MTwxjyN3Sv8gpRRBM8xtTWKdxEbJlCLRkhKfbuTwyURO7BC0L1Scm4DRQtwB3wRQB/XRqk1cxq0/7CPLu5ve6enH7wt35Fck= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2017 16:54:53.9905 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR02MB1135 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.70 Subject: [Qemu-devel] [PATCH v3 2/7] Convert remaining error_report() to warn_report() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Alexander Graf , Cornelia Huck , armbru@redhat.com, Max Reitz , Christian Borntraeger , Stefan Hajnoczi , pbonzini@redhat.com, alistair23@gmail.com, alistair.francis@xilinx.com, Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" In a previous patch (3dc6f8693694a649a9c83f1e2746565b47683923) we converted uses of error_report("warning:"... to use warn_report() instead. This was to help standardise on a single method of printing warnings to the user. There appears to have been some cases that slipped through in patch sets applied around the same time, this patch catches the few remaining cases. All of the warnings were changed using this command: find ./* -type f -exec sed -i \ 's|error_report(".*warning[,:] |warn_report("|Ig' {} + Indentation fixed up manually afterwards. Two messages were manually fixed up as well. Signed-off-by: Alistair Francis Cc: Kevin Wolf Cc: Max Reitz Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Alexander Graf Cc: Richard Henderson Cc: Stefan Hajnoczi Acked-by: Cornelia Huck Reviewed-by: Markus Armbruster --- block/qcow2.c | 9 +++++---- target/s390x/kvm.c | 4 ++-- trace/control.c | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 40ba26c111..27ce159b10 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -302,10 +302,11 @@ static int qcow2_read_extensions(BlockDriverState *bs, uint64_t start_offset, } if (!(s->autoclear_features & QCOW2_AUTOCLEAR_BITMAPS)) { - error_report("WARNING: a program lacking bitmap support " - "modified this file, so all bitmaps are now " - "considered inconsistent. Some clusters may be " - "leaked, run 'qemu-img check -r' on the image " + warn_report("a program lacking bitmap support " + "modified this file, so all bitmaps are now " + "considered inconsistent"); + error_printf("Some clusters may be leaked, " + "run 'qemu-img check -r' on the image " "file to fix."); if (need_update_header != NULL) { /* Updating is needed to drop invalid bitmap extension. */ diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index c4c5791d27..dca53f544b 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -222,8 +222,8 @@ static void kvm_s390_enable_cmma(void) }; if (mem_path) { - error_report("Warning: CMM will not be enabled because it is not " - "compatible to hugetlbfs."); + warn_report("CMM will not be enabled because it is not " + "compatible with hugetlbfs."); return; } rc = kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr); diff --git a/trace/control.c b/trace/control.c index 82d8989c4d..2769934bec 100644 --- a/trace/control.c +++ b/trace/control.c @@ -72,8 +72,8 @@ void trace_event_register_group(TraceEvent **events) if (likely(next_vcpu_id < CPU_TRACE_DSTATE_MAX_EVENTS)) { events[i]->vcpu_id = next_vcpu_id++; } else { - error_report("WARNING: too many vcpu trace events; dropping '%s'", - events[i]->name); + warn_report("too many vcpu trace events; dropping '%s'", + events[i]->name); } } event_groups = g_renew(TraceEventGroup, event_groups, nevent_groups + 1); From patchwork Fri Sep 1 16:51:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 808831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="ECP3i6oE"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xkQR46wxpz9t2x for ; Sat, 2 Sep 2017 02:57:51 +1000 (AEST) Received: from localhost ([::1]:50083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpGP-0008Fs-BS for incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 12:57:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpDi-0005pP-Gu for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnpDf-00065T-Az for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:02 -0400 Received: from mail-sn1nam01on0050.outbound.protection.outlook.com ([104.47.32.50]:9768 helo=NAM01-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnpDf-00065C-26 for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:54:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ULf3fR2veRHyjzzXcEHwNaf8AuktwVuJrkSrYN1XS+g=; b=ECP3i6oEU3zLxNF7SgZBJSLnPpJ7Bh/1wBqwFGimn1J7EYYkjdzEGuIQrNi33BT9167G1OZqOS/GWRKfbLARThlOTGyVvsmagSZF9m6vUORh5xKBm5+Wzf1rAxXezHRjN9DMrbs/0vK12pI5j4YBN0PcWY1v+FGaLxyGGU/5qUQ= Received: from BY2PR02CA0008.namprd02.prod.outlook.com (10.163.44.146) by BN3PR02MB1128.namprd02.prod.outlook.com (10.162.168.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 1 Sep 2017 16:54:55 +0000 Received: from SN1NAM02FT019.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::206) by BY2PR02CA0008.outlook.office365.com (2a01:111:e400:5261::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Fri, 1 Sep 2017 16:54:54 +0000 Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT019.mail.protection.outlook.com (10.152.72.130) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Fri, 1 Sep 2017 16:54:53 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDZ-0002aM-7N; Fri, 01 Sep 2017 09:54:53 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dnpDZ-0003eO-4D; Fri, 01 Sep 2017 09:54:53 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v81GspmY028968; Fri, 1 Sep 2017 09:54:51 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDX-0003dX-C8; Fri, 01 Sep 2017 09:54:51 -0700 From: Alistair Francis To: Date: Fri, 1 Sep 2017 09:51:15 -0700 Message-ID: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23296.003 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(2980300002)(438002)(199003)(189002)(106466001)(4326008)(626005)(2351001)(33646002)(8936002)(39060400002)(118296001)(47776003)(50226002)(6916009)(50986999)(356003)(76176999)(2950100002)(36386004)(63266004)(77096006)(54906002)(81166006)(9786002)(8676002)(2906002)(110136004)(5003940100001)(81156014)(36756003)(478600001)(48376002)(50466002)(305945005)(189998001)(7416002)(575784001)(6666003)(5660300001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR02MB1128; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT019; 1:DplZ94Ys1KF8T1TycEFUA8pxs1JwwMJmk3kZh7+Hrkj3VWxF7c3kQEZJCB5/B9OqRQO0jN/cMlDtEPi6Aebqy+1K7pJG0LOzgHPO7tckYu6oMLZiPrUsclu5OTR2pPOQ MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 973e2d84-3255-4c71-13f4-08d4f15a2b77 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR02MB1128; X-Microsoft-Exchange-Diagnostics: 1; BN3PR02MB1128; 3:TeD3SKWqF2LfegpDawH/Xk7hMD5vTzOUK3aDfuVNMgYaLsT1cyO+XiJqznhJS7kUopeuXb2RMnhKU5xflvxTRX/e1P31RtxWzx1IgZlaHGm8FQViCP2jJempVGykE/Z4HJ2ouo5U26eGwTcWIZhejDz8ezKwz7b/yDnfmWUdL+2iVkWR6lVo3su+5c14ouOY9dpU90IlsUKOnDd0R6aXn47KUN6mohTnf3p7sVsfeC2rqNhCY5sZmwzyc6z5wRTTdomtsRknqm96h1WlFJ2U5JZrx8r6N1CEEvGzki/f7WhSHj9alf8ZM1VuDXVwJD+LCi97noH4bvyxO2V5Kkdi0tEq5WM7urnoC3Qo2M7P7So=; 25:zcTdEjKXz0QtezSl2FymZDTZleW+bk4s+jjQQfArqNiVYzufJbufmczfKOW90AIv6h49UAlXbpveCM9xP8lM+F9s7VPgNtbM0FfTqioKKUq/o49AwcuqvKcTfTVmd8DEaK64DnXZtXugQ0CgQJeWTKAlaB1AlaU4CQwRzOhaBUxPEabm1Texc4bVF1rJdIbynHOW7ABJrkpOd03wTkDJoz1KsC6M9T7yLGSw2ipJeseV6GHBGUGkB2wS9MX3hDuABQqSo9q33oUaYUfjcTq8ktDAEgh71AgIS5UfEVlMib+5I3X26CAaujVMe90O05S63Thbnf47UZo7T6aKFFh6fw== X-MS-TrafficTypeDiagnostic: BN3PR02MB1128: X-Microsoft-Exchange-Diagnostics: 1; BN3PR02MB1128; 31:A5+WRwHLNR5hABb7jGoFCrQnBBL7aS+drJaykydNWGrhdPW06S+RGadBBRAeNSKZJsYIotzw52VGeipUQEpzILqTXkHcyoxYrzxU35aB6/zd3Aea/hTLGMLByxPppGcX/RJ9oYse4BxaZ+FT/m33Qlq3naKx+jClFd9ejbntfnR+gQxYxld1jCcGmELtubprfAVEPpgRQrimn+NJ3D9ETfAmDa/STmsWtxLWicZi4mg=; 20:PIYxCz3Mav7Yoq/sp40EWqqs0mWXS2PuyO/OxYlB2WGkoms7oXECQkSljcBCdvmIe40m4bhsRbpW6TeMgccH7lJ1t+V3rbx+fqTAK6Kk2ZWfhKn/0pwsgOcx5qQrKUL30WKnFkils5O6wjIbIq+1haPts7DLim1oFElRfawmt93Q/HqdlVkn0g/KA/RfpRGR7Wa3wZoKs+aSkXtIklkV7EVZsY4a8gHeH37mMXufrXEx91PKtikjjEXlSutIxKMhRUa3g92v1LCKHuYm3TM7/F4LgtmyHF8c0ovN2RJ8uSdRUubSOnyJ/tVtIpTbfluCa5K0dbniaUMhi6dmGVG6Xr0UwcI1JEex37Jtxiyf0IzXhJI1Tdsse/d6/x2Ulrcbjm56HmmOtCN1/aed6NX4q6DF6FbiMuXSaY8rX23bGQ2l5a5kZ02L8OcMk8xt2a4v+grMnjelFOQL6gTUIqMQgXBnoB9QicpgQzMQVFEkiVXA9D5JvghAjh0qin4nYlFV X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(104084551191319); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(100000703101)(100105400095)(93006095)(93004095)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR02MB1128; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR02MB1128; X-Microsoft-Exchange-Diagnostics: 1; BN3PR02MB1128; 4:XBdCGdf5eLLt+01HYeDg87KIskpHNCdyHz9b6EUyGqy2gwFT+x/v//OwM79bAlx1C6XSdfUidHzfd3m7g4iOpU1XGQ3Y8/9uqhLgKy4WDv99PCGggHxEDtbBPBEBd1HoFyXXciWuO8J2crQP2jyl5dWe3tXrsv7u7zGd0nKaXmkFtBQLIbHZ57UEmZCU/NnJ22e9i5qX+r0fLv8RYqOHdbotHIQTrdFl/Sbm/wYiAQWYJ5mMpyZB+R4Q7wkCu8AmcZCugmSooVFsai748Z9GWdZx12/9SlyUT7b5P/2tirZeo7hZ02loNktp45tBIK6oEckJx3NP44FC9wzeAVri5A== X-Forefront-PRVS: 0417A3FFD2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR02MB1128; 23:gaB/QcFietl6hizjwqegQu9nA6PmsnqsmbfM2xi+p?= fZ6/eH4ni+AnL1IXAG9OTmVARQZOpZJJZVkNtxdV4KFHWFYO0l79Tg7mpeRTBpNTpdIAhwTOHNOOr9JP9DlCD003Ord48n127n5iqlc5QmiVdEYVoz4Pk56GgcOR2CSz+Gptd9QicMJ6AcbJBxh80TPmsEcrmuilDeEz+Wb7HR8XRhlo3yk2hXRtyQplD4ckBC0ztkZd4DtiEXSNHfDGeHI/NigbKVvY11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a1L09r+765ZZJnBHGqoiAY5RKhR6qDpuwE3/IalRZkfHT7IfSbU50HLUMksZMH+4JSt8D6+fvkhC+1KiqGaRnvyUNYUd6evrw3XIOooQpz1WA==; 5:oSZLRd8M/bOo0ijDZtdwC83b5yz5bUHY6gomUvHiMuu+Y1UsLSADV1Q24I5RG4Q8RiPfE1vJSsWp+IcB1TnTSf3Ja+9XdDfinYkTZj4sPUcFYc0+oqOudnSb0+MkqSLo0jZGcDV7bkBPF01QweRiZA==; 24:3iw7ZP3eLmCyhf9Q5weKZBq6zJopwiAeXoHo9atmiCprPmTOnMp7VnCUGyAZwyFyxj568b/i5srTFTGvXThF4t2IF+tridF4bA/QXYLoU2s=; 7:WAwTxmjNqU+heIQKkCc353um3uw4lBe9gkz7dvZsCwOUXkQ+sQnFmVQIycKWfwr3IZ8QKL5CZyiCFvCaThn9ihQCrwh1SFSO5kK3PHPbX+hq8se3MieU77VP86pW5jkUGj7Q1WYlgAcPTJTJnieayeofbXFkWbEHT8HbQs/GMEUPyGk64QP5ZAcWOPJarzP45Vq2UeF+kKS4et1ilj+by4Z3EdViXBbkOvoJ6Vq/j2Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2017 16:54:53.7313 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR02MB1128 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.32.50 Subject: [Qemu-devel] [PATCH v3 3/7] Convert single line fprintf(.../n) to warn_report() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , James Hogan , Eduardo Habkost , "Michael S. Tsirkin" , Jason Wang , armbru@redhat.com, Max Reitz , Igor Mammedov , Gerd Hoffmann , Stefan Hajnoczi , pbonzini@redhat.com, Yongbok Kim , alistair23@gmail.com, alistair.francis@xilinx.com, Michael Roth , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Convert all the single line uses of fprintf(stderr, "warning:"..."\n"... to use warn_report() instead. This helps standardise on a single method of printing warnings to the user. All of the warnings were changed using this command: find ./* -type f -exec sed -i \ 's|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig' \ {} + Some of the lines were manually edited to reduce the line length to below 80 charecters. The #include lines were manually updated to allow the code to compile. Signed-off-by: Alistair Francis Cc: Kevin Wolf Cc: Max Reitz Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Gerd Hoffmann Cc: Jason Wang Cc: Michael Roth Cc: James Hogan Cc: Aurelien Jarno Cc: Yongbok Kim Cc: Stefan Hajnoczi Reviewed-by: Markus Armbruster Reviewed-by: James Hogan [mips] --- block/vvfat.c | 4 +++- hw/acpi/core.c | 3 ++- hw/i386/pc.c | 2 +- hw/misc/applesmc.c | 2 +- hw/usb/hcd-ehci.c | 5 +++-- hw/virtio/virtio-balloon.c | 3 ++- net/hub.c | 3 ++- net/socket.c | 7 +++++-- qga/vss-win32.c | 2 +- target/mips/kvm.c | 4 ++-- trace/simple.c | 3 ++- ui/keymaps.c | 2 +- ui/spice-display.c | 2 +- 13 files changed, 26 insertions(+), 16 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index a9e207f7f0..d682f0a9dc 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -32,6 +32,7 @@ #include "qapi/qmp/qbool.h" #include "qapi/qmp/qstring.h" #include "qemu/cutils.h" +#include "qemu/error-report.h" #ifndef S_IWGRP #define S_IWGRP 0 @@ -3028,7 +3029,8 @@ DLOG(checkpoint()); if (memcmp(direntries + k, array_get(&(s->directory), dir_index + k), sizeof(direntry_t))) { - fprintf(stderr, "Warning: tried to write to write-protected file\n"); + warn_report("tried to write to write-protected " + "file"); return -1; } } diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 95fcac95a2..2a1b79c838 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -28,6 +28,7 @@ #include "qapi/opts-visitor.h" #include "qapi-visit.h" #include "qapi-event.h" +#include "qemu/error-report.h" struct acpi_table_header { uint16_t _length; /* our length, not actual part of the hdr */ @@ -221,7 +222,7 @@ static void acpi_table_install(const char unsigned *blob, size_t bloblen, } if (!has_header && changed_fields == 0) { - fprintf(stderr, "warning: ACPI table: no headers are specified\n"); + warn_report("ACPI table: no headers are specified"); } /* recalculate checksum */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c882f8c2ea..ef5f30e644 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1310,7 +1310,7 @@ void pc_acpi_init(const char *default_dsdt) filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, default_dsdt); if (filename == NULL) { - fprintf(stderr, "WARNING: failed to find %s\n", default_dsdt); + warn_report("failed to find %s", default_dsdt); } else { QemuOpts *opts = qemu_opts_create(qemu_find_opts("acpi"), NULL, 0, &error_abort); diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c index 7896812304..7be8b5f13c 100644 --- a/hw/misc/applesmc.c +++ b/hw/misc/applesmc.c @@ -331,7 +331,7 @@ static void applesmc_isa_realize(DeviceState *dev, Error **errp) s->iobase + APPLESMC_ERR_PORT); if (!s->osk || (strlen(s->osk) != 64)) { - fprintf(stderr, "WARNING: Using AppleSMC with invalid key\n"); + warn_report("Using AppleSMC with invalid key"); s->osk = default_osk; } diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 604912cb3e..46fd30b075 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -32,6 +32,7 @@ #include "hw/usb/ehci-regs.h" #include "hw/usb/hcd-ehci.h" #include "trace.h" +#include "qemu/error-report.h" #define FRAME_TIMER_FREQ 1000 #define FRAME_TIMER_NS (NANOSECONDS_PER_SECOND / FRAME_TIMER_FREQ) @@ -348,7 +349,7 @@ static void ehci_trace_sitd(EHCIState *s, hwaddr addr, static void ehci_trace_guest_bug(EHCIState *s, const char *message) { trace_usb_ehci_guest_bug(message); - fprintf(stderr, "ehci warning: %s\n", message); + warn_report("%s", message); } static inline bool ehci_enabled(EHCIState *s) @@ -1728,7 +1729,7 @@ static int ehci_state_fetchsitd(EHCIState *ehci, int async) /* siTD is not active, nothing to do */; } else { /* TODO: split transfers are not implemented */ - fprintf(stderr, "WARNING: Skipping active siTD\n"); + warn_report("Skipping active siTD"); } ehci_set_fetch_addr(ehci, async, sitd.next); diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index a705e0ec55..37cde38982 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -26,6 +26,7 @@ #include "qapi/visitor.h" #include "qapi-event.h" #include "trace.h" +#include "qemu/error-report.h" #include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio-access.h" @@ -292,7 +293,7 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq) s->stats_vq_offset = offset; if (qemu_gettimeofday(&tv) < 0) { - fprintf(stderr, "warning: %s: failed to get time of day\n", __func__); + warn_report("%s: failed to get time of day", __func__); goto out; } diff --git a/net/hub.c b/net/hub.c index 32d8cf5cd4..afe941ae7a 100644 --- a/net/hub.c +++ b/net/hub.c @@ -18,6 +18,7 @@ #include "clients.h" #include "hub.h" #include "qemu/iov.h" +#include "qemu/error-report.h" /* * A hub broadcasts incoming packets to all its ports except the source port. @@ -330,7 +331,7 @@ void net_hub_check_clients(void) } } if (has_host_dev && !has_nic) { - fprintf(stderr, "Warning: vlan %d with no nics\n", hub->id); + warn_report("vlan %d with no nics", hub->id); } if (has_nic && !has_host_dev) { fprintf(stderr, diff --git a/net/socket.c b/net/socket.c index 18af2ab5f3..daea750644 100644 --- a/net/socket.c +++ b/net/socket.c @@ -448,8 +448,11 @@ static NetSocketState *net_socket_fd_init(NetClientState *peer, case SOCK_STREAM: return net_socket_fd_init_stream(peer, model, name, fd, is_connected); default: - /* who knows ... this could be a eg. a pty, do warn and continue as stream */ - fprintf(stderr, "qemu: warning: socket type=%d for fd=%d is not SOCK_DGRAM or SOCK_STREAM\n", so_type, fd); + /* who knows ... this could be a eg. a pty, do warn and continue as + * stream + */ + warn_report("socket type=%d for fd=%d is not SOCK_DGRAM or " + "SOCK_STREAM", so_type, fd); return net_socket_fd_init_stream(peer, model, name, fd, is_connected); } return NULL; diff --git a/qga/vss-win32.c b/qga/vss-win32.c index a80933c98b..b748b9ff57 100644 --- a/qga/vss-win32.c +++ b/qga/vss-win32.c @@ -61,7 +61,7 @@ static bool vss_check_os_version(void) return false; } if (wow64) { - fprintf(stderr, "Warning: Running under WOW64\n"); + warn_report("Running under WOW64"); } #endif return !wow64; diff --git a/target/mips/kvm.c b/target/mips/kvm.c index 3317905e71..a23aa438d2 100644 --- a/target/mips/kvm.c +++ b/target/mips/kvm.c @@ -95,11 +95,11 @@ void kvm_mips_reset_vcpu(MIPSCPU *cpu) CPUMIPSState *env = &cpu->env; if (!kvm_mips_fpu_cap && env->CP0_Config1 & (1 << CP0C1_FP)) { - fprintf(stderr, "Warning: KVM does not support FPU, disabling\n"); + warn_report("KVM does not support FPU, disabling"); env->CP0_Config1 &= ~(1 << CP0C1_FP); } if (!kvm_mips_msa_cap && env->CP0_Config3 & (1 << CP0C3_MSAP)) { - fprintf(stderr, "Warning: KVM does not support MSA, disabling\n"); + warn_report("KVM does not support MSA, disabling"); env->CP0_Config3 &= ~(1 << CP0C3_MSAP); } diff --git a/trace/simple.c b/trace/simple.c index a221a3f703..e82018d923 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -15,6 +15,7 @@ #include "qemu/timer.h" #include "trace/control.h" #include "trace/simple.h" +#include "qemu/error-report.h" /** Trace file header event ID, picked to avoid conflict with real event IDs */ #define HEADER_EVENT_ID (~(uint64_t)0) @@ -405,7 +406,7 @@ bool st_init(void) thread = trace_thread_create(writeout_thread); if (!thread) { - fprintf(stderr, "warning: unable to initialize simple trace backend\n"); + warn_report("unable to initialize simple trace backend"); return false; } diff --git a/ui/keymaps.c b/ui/keymaps.c index fa00b82027..7fa21f81b2 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -141,7 +141,7 @@ static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table, int keysym; keysym = get_keysym(table, keyname); if (keysym == 0) { - /* fprintf(stderr, "Warning: unknown keysym %s\n", line);*/ + /* warn_report("unknown keysym %s", line);*/ } else { const char *rest = line + offset + 1; int keycode = strtol(rest, NULL, 0); diff --git a/ui/spice-display.c b/ui/spice-display.c index 042292cc90..0963c7825f 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -850,7 +850,7 @@ static void qemu_spice_gl_unblock_bh(void *opaque) static void qemu_spice_gl_block_timer(void *opaque) { - fprintf(stderr, "WARNING: spice: no gl-draw-done within one second\n"); + warn_report("spice: no gl-draw-done within one second"); } static void spice_gl_refresh(DisplayChangeListener *dcl) From patchwork Fri Sep 1 16:51:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 808835 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="F6AJtAKc"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xkQWW3DwYz9t2x for ; Sat, 2 Sep 2017 03:01:43 +1000 (AEST) Received: from localhost ([::1]:50254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpK9-0003qB-J5 for incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 13:01:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpET-0006gk-95 for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnpEM-0006Oz-QZ for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:49 -0400 Received: from mail-dm3nam03on0059.outbound.protection.outlook.com ([104.47.41.59]:27184 helo=NAM03-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnpEM-0006O5-3h for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0aAn2gJp32t91A6LR8DetARH2Qxk7O8thx/4zRDQ5sI=; b=F6AJtAKcyNcyBNKunPBXeA+TQjN7lV5BeKHFbsU6I0luWZ3n9K2TWYG/t3KBK2EQoHzk0AcIA+ypaZF/aYhUp3kjBpgXQxMN1oan7k3q++3oFQqJjLYyaWr46NIQ+9/DrBc2AfvR/O8bXxNK1uLMUXCMHeonTWrHYQkGOcmn8sU= Received: from MWHPR02CA0060.namprd02.prod.outlook.com (10.164.133.49) by BY2PR0201MB1925.namprd02.prod.outlook.com (10.163.75.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.13.10; Fri, 1 Sep 2017 16:55:06 +0000 Received: from CY1NAM02FT030.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::208) by MWHPR02CA0060.outlook.office365.com (2603:10b6:301:60::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18 via Frontend Transport; Fri, 1 Sep 2017 16:55:05 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT030.mail.protection.outlook.com (10.152.75.163) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Fri, 1 Sep 2017 16:55:04 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:57450 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDj-0000Pm-Cn; Fri, 01 Sep 2017 09:55:03 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dnpDj-0003lD-A3; Fri, 01 Sep 2017 09:55:03 -0700 Received: from xsj-pvapsmtp01 (mailhub.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v81GssDZ028977; Fri, 1 Sep 2017 09:54:54 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDa-0003ey-BR; Fri, 01 Sep 2017 09:54:54 -0700 From: Alistair Francis To: Date: Fri, 1 Sep 2017 09:51:18 -0700 Message-ID: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23296.003 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(2980300002)(438002)(189002)(199003)(9786002)(4326008)(6666003)(48376002)(50466002)(5003940100001)(2950100002)(6916009)(2351001)(8666007)(106466001)(118296001)(575784001)(2906002)(626005)(36756003)(36386004)(50226002)(54906002)(8936002)(5660300001)(47776003)(110136004)(305945005)(50986999)(189998001)(76176999)(356003)(39060400002)(478600001)(77096006)(81166006)(81156014)(8676002)(63266004)(7416002)(33646002)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB1925; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT030; 1:oVdvPvHXYECotEQNg0q38d7g9i0i50WMkhsA3DKLRtl1XLOK7DrTxKzPWugJT9gvmOHtZftVfI6XkY1RaAM0N8L51F/ltl9UItFokDN5PjCfGFGZDQXUZ8F7zBfEKioO MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eacb81e3-d0ba-4dbb-3e36-08d4f15a3210 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR0201MB1925; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1925; 3:pgnoN3kUhgx+FW08/QIObYkqB6rdaluBvhcaa3P3GOvt++BVd3Y0W2GHCrjRocXPWJDsCjqsiXf0iaxsnQR6TeYyOWI5XtFfaD5Go/s4a4itWLt7ki54++TmlCeT3SLkiMCXMv/g4XdHWSNrAq1LRo6nJnlfZPRfESYe8k15NEyVj40VMwxDtsG5BioIU2FAGv5riTGjzZ4hBN24V5Gw2hKw+FCtsVNO8nPMeNQuw22YCSijLViV2JzJ8jhkzSWOHC6cqqpUYZeEmgSk2gmvCFxWUZf0dKQ+QlQxqeM5oX3UBT+9pen+FnXQbeF4W4MWBfpcwzoL4LkxijxVOUSKSyIMcRXp7v4RMG33LdDNolg=; 25:uuab40pa6UPYiZYzuTnY6yyrhVnUP+lMeFbZjsSvkqUxVW0YqqSVuN8h3UKVDK787drVNvGoLSytgsBEOJS2Fu5RiyQTsT7XCYj0sbW0stY6qTJWq4Upv/evYzBWK6YSGuxeNDgjm2H/nRL1aFb9dcEPAv6ZY8yO1LptSbls8J4AO4I1IbONLR/khyVMfHDt4TFcWEM9apq1GgezQq/yFtIcTdpbY9S/SZuuVnpS2syGs8Yq8U1l7NADdjHf67CIfS78eKzD+2ULpdaWEy8mq63HBp7GITRBvQjHF7H+kVd2yH/0OJWTzkJQywiWHq9cTy4RFRWXApS+zjHEZmgxXA== X-MS-TrafficTypeDiagnostic: BY2PR0201MB1925: X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1925; 31:UROjLMl0T9T0JUYMXKy/4721fCXh6IuCcetGPGtO7+oq8Ns6J52Xb8pOKj0LtQmErkA7ljbabEd2Zzy1LzZB3+kKeY+r5hDIYb3Q0m3x4/4gmJyA7OZMgwjFbjYPoykZEaLhyEFqwJZwCKR0BU8F8ZF28WJM91l4JI6ER4SNGL8w9c6qy6lhubnYVOmsbS27IrS16KOWMn1sgNbF/TfSddtNDsIs4Svpd3f+anU/+aA=; 20:Mq4y6DUHhqpXUmA0HMkw/mCl2EFvNOT8qdvZ3pm1k+pZANvPIDhMEkspHhRvn8o3T6k7mbmFPnjv0CjFirv+DYfCniandWBvg3BhgwaM3vb7yDbL9qHA5qfnOpRqFeqKidZJEnk9tBx6WcXcTnASZBNUGvEoLy+j3EYxJ2Y3chUFR3jGZx89tULjkkSMtkPGZJf7Jo5domGOQtlJ+Kuvkh2ElJP6Q8SJ36IaN2YDbSs/xVnAsm3k1AEaUYZiUjkDatq77AAcOMkbGzDUgfLCf3jmdgq6MpudFOVP5jjbR/NT5ql3jcr5MwoeSP+HCS4jKLKrwgd9ktXkEAzsfrefQirX80zVC4pa27DB0z6K5YJvTovAVgRHssRugtLdbWJdJ0hG3/ofZPszkSkJScZvRd4x6KeWyVfe1GEhFLn5lFX1YCmMH+5g8jGjzEJTtcO9pisex6RmMt+33bw1/C53qx9/0qdNI0AG2MUGudVkb/o5hGtcdY4smcKV8EVN+xDP X-Exchange-Antispam-Report-Test: UriScan:(190383065149520)(192813158149592)(70601490899591)(104084551191319)(17755550239193); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(5005006)(13016025)(8121501046)(100000703101)(100105400095)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0201MB1925; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0201MB1925; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1925; 4:ZjvacE4Z0303mNj/zM38plDyJQwYANwi6FDwyWXC+3NbWtaEQqI2sJGQH+eVqVP1/PqN68NKs79dPoh/D1kudMo+b0m+veG2DFWwsJBVSTtJFnkccWGmL5yof841w0znjXXsqk+3o9sPDw15yh+lnD22JKXl0OIrhoOiJYoxHbf2aoYY7OTe//f8n7GUlduW7UQ6eo8BCx9txCBTUPFHTjJRRv1E+8nTEKlILXMkBL1r2KVdaTAR5YXLwAvIKxOwCDqvDbIqL/MLoGVEgvjCHORCz50mZ6htOeYfOCJuYPCeEH262xe/uPvA04u2NL4aH6kuu2CktmzicYuJK9qwECYL4sEIvDOt+GNvV4H+LMwsFq3PXI8zzL853KPN3JMaStIMTQvk2TCIDmNVgrlV8iUep2gFT2SRCi4Ww+cudTbt8iE2/QFe/8pdfTnaHssO X-Forefront-PRVS: 0417A3FFD2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0201MB1925; 23:nSCrZeJlrGiN++hXeHrV/w87NipS3/m5BH7eZmX?= H2jiniOeBZpdQ8mjURPlaj0NwX/wtwqMMYtkGBgzKmQbivGaPSao1jv4GDJY92bZB9ZsbnKQHu+NTP1duLUqoplsqRBrkTby2Ptoleot3aoGpIUzbkubodqq88bA84cSGAwhdG/hWpK3jr2eqRSZM2jEj4XUpRqNnvlKj/hhQYNnO6RAL3PDQQUKh3RKPIuh2lP9HFpS+hGi1a3kNvps2ekLjTg6yolUsrgoBBcLY/w1I46tGVKXsrz+2Xnhfvpm9SrCXnpsqB5iktjhrtpmAcNAitjSIiL0hcuF0NmsuO/1OUr+f44dhZqAbeRRcFoXYSGAiMkT//PsSS5Gm4g9ai3Db2UO+mEJuUXiMZaupp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WNSgGhYzbdlvu1aEL7Kp/g==; 5:HaoHWev1I1rFckDGoiDu7f6zmN8/Pk6lTzztBBnA5wuTARANrwV8CJ1dlX9yDINtiMdkxJhxvglFw9sln9t6pJkeoCNRfNCPtl+hlAhpqdQvA0mkzaqalKFY+gSdagPJ9dVDditS7cu057crbREy2Q==; 24:MwJwOMyVxyQrDK3/Wc03VobKCun3rG3AiGBVLFZspsDPDNnhV9h1AP6plCtw4yR069KzY5bZiaKvMm7KS5/a2egR50TpJj8Jiaa0GksrHoo=; 7:7tqg+mVJUU68HzUpAHE7Z6ZnfEmHU6hpKSDZRJfS3SuDQ5fjcIveWZ9eUZHzWelqSHcs8iFfMrFBlLr8gqkBFwDr9lqpbLSk3mM0dbcbes+Z5jycoUkODkxllfwjlm6kBeBw6MXUbfaE/oqXgAWGcMhymfj2irEiRHhpK//r88V5vRghkO1j96QvaASlWptwGdfmwD2iVJCSk8wcb3vdvlZkn+yXQ5ODj5tR0A0o8dA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2017 16:55:04.1920 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1925 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.41.59 Subject: [Qemu-devel] [PATCH v3 4/7] Convert multi-line fprintf() to warn_report() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Stefano Stabellini , Eduardo Habkost , "Michael S. Tsirkin" , Jason Wang , Alexander Graf , Cornelia Huck , armbru@redhat.com, Max Reitz , Yongbok Kim , Igor Mammedov , Gerd Hoffmann , David Gibson , pbonzini@redhat.com, Anthony Perard , alistair23@gmail.com, alistair.francis@xilinx.com, Christian Borntraeger , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Convert all the multi-line uses of fprintf(stderr, "warning:"..."\n"... to use warn_report() instead. This helps standardise on a single method of printing warnings to the user. All of the warnings were changed using these commands: find ./* -type f -exec sed -i \ 'N; {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N; {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N; {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N; {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \ {} + Indentation fixed up manually afterwards. Some of the lines were manually edited to reduce the line length to below 80 charecters. Some of the lines with newlines in the middle of the string were also manually edit to avoid checkpatch errrors. The #include lines were manually updated to allow the code to compile. Several of the warning messages can be improved after this patch, to keep this patch mechanical this has been moved into a later patch. Signed-off-by: Alistair Francis Cc: Paolo Bonzini Cc: Kevin Wolf Cc: Max Reitz Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Peter Maydell Cc: Stefano Stabellini Cc: Anthony Perard Cc: Richard Henderson Cc: Eduardo Habkost Cc: Aurelien Jarno Cc: Yongbok Kim Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Alexander Graf Cc: Jason Wang Cc: David Gibson Cc: Gerd Hoffmann Acked-by: Cornelia Huck Reviewed-by: Markus Armbruster --- I couldn't figure out any nice way (it is possible with some more logic inside the sed apparently) to do this is one command, so I had to use all of the commands above. accel/kvm/kvm-all.c | 7 +++---- block/vvfat.c | 4 ++-- hw/acpi/core.c | 7 +++---- hw/arm/vexpress.c | 4 ++-- hw/i386/xen/xen-mapcache.c | 5 +++-- hw/mips/mips_malta.c | 4 ++-- hw/mips/mips_r4k.c | 6 +++--- hw/s390x/s390-virtio.c | 16 ++++++++-------- net/hub.c | 9 ++++----- net/net.c | 14 +++++++------- target/i386/cpu.c | 12 ++++++------ target/i386/hax-mem.c | 6 +++--- target/ppc/translate_init.c | 18 +++++++++--------- ui/keymaps.c | 9 +++++---- util/main-loop.c | 6 +++--- 15 files changed, 63 insertions(+), 64 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 46ce479dc3..03e26e5a07 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -1629,10 +1629,9 @@ static int kvm_init(MachineState *ms) while (nc->name) { if (nc->num > soft_vcpus_limit) { - fprintf(stderr, - "Warning: Number of %s cpus requested (%d) exceeds " - "the recommended cpus supported by KVM (%d)\n", - nc->name, nc->num, soft_vcpus_limit); + warn_report("Number of %s cpus requested (%d) exceeds " + "the recommended cpus supported by KVM (%d)", + nc->name, nc->num, soft_vcpus_limit); if (nc->num > hard_vcpus_limit) { fprintf(stderr, "Number of %s cpus requested (%d) exceeds " diff --git a/block/vvfat.c b/block/vvfat.c index d682f0a9dc..04801f3136 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -1227,8 +1227,8 @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags, switch (s->fat_type) { case 32: - fprintf(stderr, "Big fat greek warning: FAT32 has not been tested. " - "You are welcome to do so!\n"); + warn_report("FAT32 has not been tested. " + "You are welcome to do so!"); break; case 16: case 12: diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 2a1b79c838..cd0a1d357b 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -184,10 +184,9 @@ static void acpi_table_install(const char unsigned *blob, size_t bloblen, } if (has_header && le32_to_cpu(ext_hdr->length) != acpi_payload_size) { - fprintf(stderr, - "warning: ACPI table has wrong length, header says " - "%" PRIu32 ", actual size %zu bytes\n", - le32_to_cpu(ext_hdr->length), acpi_payload_size); + warn_report("ACPI table has wrong length, header says " + "%" PRIu32 ", actual size %zu bytes", + le32_to_cpu(ext_hdr->length), acpi_payload_size); } ext_hdr->length = cpu_to_le32(acpi_payload_size); diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 528c65ddb6..2445eb4408 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -491,8 +491,8 @@ static void vexpress_modify_dtb(const struct arm_boot_info *info, void *fdt) /* Not fatal, we just won't provide virtio. This will * happen with older device tree blobs. */ - fprintf(stderr, "QEMU: warning: couldn't find interrupt controller in " - "dtb; will not include virtio-mmio devices in the dtb.\n"); + warn_report("couldn't find interrupt controller in " + "dtb; will not include virtio-mmio devices in the dtb."); } else { int i; const hwaddr *map = daughterboard->motherboard_map; diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c index 369c3df8a0..91a4fd6984 100644 --- a/hw/i386/xen/xen-mapcache.c +++ b/hw/i386/xen/xen-mapcache.c @@ -9,6 +9,7 @@ */ #include "qemu/osdep.h" +#include "qemu/error-report.h" #include @@ -125,8 +126,8 @@ void xen_map_cache_init(phys_offset_to_gaddr_t f, void *opaque) rlimit_as.rlim_cur = rlimit_as.rlim_max; if (rlimit_as.rlim_max != RLIM_INFINITY) { - fprintf(stderr, "Warning: QEMU's maximum size of virtual" - " memory is not infinity.\n"); + warn_report("QEMU's maximum size of virtual" + " memory is not infinity."); } if (rlimit_as.rlim_max < MCACHE_MAX_SIZE + NON_MCACHE_MEMORY_SIZE) { mapcache->max_mcache_size = rlimit_as.rlim_max - diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index af678f5784..233e2ee802 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -216,8 +216,8 @@ static void generate_eeprom_spd(uint8_t *eeprom, ram_addr_t ram_size) } if (ram_size) { - fprintf(stderr, "Warning: SPD cannot represent final %dMB" - " of SDRAM\n", (int)ram_size); + warn_report("SPD cannot represent final %dMB" + " of SDRAM", (int)ram_size); } /* fill in SPD memory information */ diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index 2f5ced7409..6ffb88fd70 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -253,9 +253,9 @@ void mips_r4k_init(MachineState *machine) fprintf(stderr, "qemu: Error registering flash memory.\n"); } } else if (!qtest_enabled()) { - /* not fatal */ - fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n", - bios_name); + /* not fatal */ + warn_report("could not load MIPS bios '%s'", + bios_name); } g_free(filename); diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c index afa4148e6b..964df517b4 100644 --- a/hw/s390x/s390-virtio.c +++ b/hw/s390x/s390-virtio.c @@ -146,9 +146,9 @@ void gtod_save(QEMUFile *f, void *opaque) r = s390_get_clock(&tod_high, &tod_low); if (r) { - fprintf(stderr, "WARNING: Unable to get guest clock for migration. " - "Error code %d. Guest clock will not be migrated " - "which could cause the guest to hang.\n", r); + warn_report("Unable to get guest clock for migration. " + "Error code %d. Guest clock will not be migrated " + "which could cause the guest to hang.", r); qemu_put_byte(f, S390_TOD_CLOCK_VALUE_MISSING); return; } @@ -165,8 +165,8 @@ int gtod_load(QEMUFile *f, void *opaque, int version_id) int r; if (qemu_get_byte(f) == S390_TOD_CLOCK_VALUE_MISSING) { - fprintf(stderr, "WARNING: Guest clock was not migrated. This could " - "cause the guest to hang.\n"); + warn_report("Guest clock was not migrated. This could " + "cause the guest to hang."); return 0; } @@ -175,9 +175,9 @@ int gtod_load(QEMUFile *f, void *opaque, int version_id) r = s390_set_clock(&tod_high, &tod_low); if (r) { - fprintf(stderr, "WARNING: Unable to set guest clock value. " - "s390_get_clock returned error %d. This could cause " - "the guest to hang.\n", r); + warn_report("Unable to set guest clock value. " + "s390_get_clock returned error %d. This could cause " + "the guest to hang.", r); } return 0; diff --git a/net/hub.c b/net/hub.c index afe941ae7a..745a2168a1 100644 --- a/net/hub.c +++ b/net/hub.c @@ -310,8 +310,8 @@ void net_hub_check_clients(void) QLIST_FOREACH(port, &hub->ports, next) { peer = port->nc.peer; if (!peer) { - fprintf(stderr, "Warning: hub port %s has no peer\n", - port->nc.name); + warn_report("hub port %s has no peer", + port->nc.name); continue; } @@ -334,9 +334,8 @@ void net_hub_check_clients(void) warn_report("vlan %d with no nics", hub->id); } if (has_nic && !has_host_dev) { - fprintf(stderr, - "Warning: vlan %d is not connected to host network\n", - hub->id); + warn_report("vlan %d is not connected to host network", + hub->id); } } } diff --git a/net/net.c b/net/net.c index 0e28099554..45ab2a1a02 100644 --- a/net/net.c +++ b/net/net.c @@ -1481,9 +1481,9 @@ void net_check_clients(void) QTAILQ_FOREACH(nc, &net_clients, next) { if (!nc->peer) { - fprintf(stderr, "Warning: %s %s has no peer\n", - nc->info->type == NET_CLIENT_DRIVER_NIC ? - "nic" : "netdev", nc->name); + warn_report("%s %s has no peer", + nc->info->type == NET_CLIENT_DRIVER_NIC ? + "nic" : "netdev", nc->name); } } @@ -1494,10 +1494,10 @@ void net_check_clients(void) for (i = 0; i < MAX_NICS; i++) { NICInfo *nd = &nd_table[i]; if (nd->used && !nd->instantiated) { - fprintf(stderr, "Warning: requested NIC (%s, model %s) " - "was not created (not supported by this machine?)\n", - nd->name ? nd->name : "anonymous", - nd->model ? nd->model : "unspecified"); + warn_report("requested NIC (%s, model %s) " + "was not created (not supported by this machine?)", + nd->name ? nd->name : "anonymous", + nd->model ? nd->model : "unspecified"); } } } diff --git a/target/i386/cpu.c b/target/i386/cpu.c index ddc45abd70..8c9ec7da0f 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1722,12 +1722,12 @@ static void report_unavailable_features(FeatureWord w, uint32_t mask) if ((1UL << i) & mask) { const char *reg = get_register_name_32(f->cpuid_reg); assert(reg); - fprintf(stderr, "warning: %s doesn't support requested feature: " - "CPUID.%02XH:%s%s%s [bit %d]\n", - kvm_enabled() ? "host" : "TCG", - f->cpuid_eax, reg, - f->feat_names[i] ? "." : "", - f->feat_names[i] ? f->feat_names[i] : "", i); + warn_report("%s doesn't support requested feature: " + "CPUID.%02XH:%s%s%s [bit %d]", + kvm_enabled() ? "host" : "TCG", + f->cpuid_eax, reg, + f->feat_names[i] ? "." : "", + f->feat_names[i] ? f->feat_names[i] : "", i); } } } diff --git a/target/i386/hax-mem.c b/target/i386/hax-mem.c index af090343f3..756f2dd268 100644 --- a/target/i386/hax-mem.c +++ b/target/i386/hax-mem.c @@ -178,9 +178,9 @@ static void hax_process_section(MemoryRegionSection *section, uint8_t flags) if (!memory_region_is_ram(mr)) { if (memory_region_is_romd(mr)) { /* HAXM kernel module does not support ROMD yet */ - fprintf(stderr, "%s: Warning: Ignoring ROMD region 0x%016" PRIx64 - "->0x%016" PRIx64 "\n", __func__, start_pa, - start_pa + size); + warn_report("Ignoring ROMD region 0x%016" PRIx64 + "->0x%016" PRIx64 "", __func__, start_pa, + start_pa + size); } return; } diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 8fb407ed73..989c104b76 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -9225,14 +9225,14 @@ static void init_ppc_proc(PowerPCCPU *cpu) env->tlb_per_way = env->nb_tlb / env->nb_ways; } if (env->irq_inputs == NULL) { - fprintf(stderr, "WARNING: no internal IRQ controller registered.\n" - " Attempt QEMU to crash very soon !\n"); + warn_report("no internal IRQ controller registered." + " Attempt QEMU to crash very soon !"); } #endif if (env->check_pow == NULL) { - fprintf(stderr, "WARNING: no power management check handler " - "registered.\n" - " Attempt QEMU to crash very soon !\n"); + warn_report("no power management check handler " + "registered." + " Attempt QEMU to crash very soon !"); } } @@ -9786,10 +9786,10 @@ static int ppc_fixup_cpu(PowerPCCPU *cpu) * tree. */ if ((env->insns_flags & ~PPC_TCG_INSNS) || (env->insns_flags2 & ~PPC_TCG_INSNS2)) { - fprintf(stderr, "Warning: Disabling some instructions which are not " - "emulated by TCG (0x%" PRIx64 ", 0x%" PRIx64 ")\n", - env->insns_flags & ~PPC_TCG_INSNS, - env->insns_flags2 & ~PPC_TCG_INSNS2); + warn_report("Disabling some instructions which are not " + "emulated by TCG (0x%" PRIx64 ", 0x%" PRIx64 ")", + env->insns_flags & ~PPC_TCG_INSNS, + env->insns_flags2 & ~PPC_TCG_INSNS2); } env->insns_flags &= PPC_TCG_INSNS; env->insns_flags2 &= PPC_TCG_INSNS2; diff --git a/ui/keymaps.c b/ui/keymaps.c index 7fa21f81b2..a6cefdaff9 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -26,6 +26,7 @@ #include "keymaps.h" #include "sysemu/sysemu.h" #include "trace.h" +#include "qemu/error-report.h" static int get_keysym(const name2keysym_t *table, const char *name) @@ -76,8 +77,8 @@ static void add_keysym(char *line, int keysym, int keycode, kbd_layout_t *k) { k->keysym2keycode[keysym] = keycode; } else { if (k->extra_count >= MAX_EXTRA_COUNT) { - fprintf(stderr, "Warning: Could not assign keysym %s (0x%x)" - " because of memory constraints.\n", line, keysym); + warn_report("Could not assign keysym %s (0x%x)" + " because of memory constraints.", line, keysym); } else { trace_keymap_add("extra", keysym, keycode, line); k->keysym2keycode_extra[k->extra_count]. @@ -197,8 +198,8 @@ int keysym2scancode(void *kbd_layout, int keysym) if (keysym < MAX_NORMAL_KEYCODE) { if (k->keysym2keycode[keysym] == 0) { trace_keymap_unmapped(keysym); - fprintf(stderr, "Warning: no scancode found for keysym %d\n", - keysym); + warn_report("no scancode found for keysym %d", + keysym); } return k->keysym2keycode[keysym]; } else { diff --git a/util/main-loop.c b/util/main-loop.c index 2f48f41e62..7558eb5f53 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -32,6 +32,7 @@ #include "slirp/libslirp.h" #include "qemu/main-loop.h" #include "block/aio.h" +#include "qemu/error-report.h" #ifndef _WIN32 @@ -236,9 +237,8 @@ static int os_host_main_loop_wait(int64_t timeout) static bool notified; if (!notified && !qtest_enabled() && !qtest_driver()) { - fprintf(stderr, - "main-loop: WARNING: I/O thread spun for %d iterations\n", - MAX_MAIN_LOOP_SPIN); + warn_report("I/O thread spun for %d iterations", + MAX_MAIN_LOOP_SPIN); notified = true; } From patchwork Fri Sep 1 16:51:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 808834 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="hYzxkxSv"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xkQTb2mjHz9t3F for ; Sat, 2 Sep 2017 03:00:03 +1000 (AEST) Received: from localhost ([::1]:50150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpIX-0001mm-GU for incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 13:00:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpDt-00061k-OF for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnpDo-00069v-HB for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:13 -0400 Received: from mail-co1nam03on0066.outbound.protection.outlook.com ([104.47.40.66]:35376 helo=NAM03-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnpDo-00067g-4g for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2AtWTyeB4XhFuihSm7pSzpZNgzlhS1P62ou0+6wFiMk=; b=hYzxkxSv3ImMp5tvjxwTqIqzNxvFb7DEvT3EKk2svlLrCIhhmVZlGOOWnL0EXyNdgkIk6TUx2kmxLWidPhWmlsOsBwbn4c9aq8WxovQKND+0uYq3ywr/1umz1PEojVrnOe75qOuk21abblW4Fiugda7YV3mVCn0Pek8RMP9htzk= Received: from BY2PR02CA0107.namprd02.prod.outlook.com (10.163.44.161) by CY1PR0201MB1929.namprd02.prod.outlook.com (10.163.56.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 1 Sep 2017 16:55:05 +0000 Received: from BL2NAM02FT022.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::207) by BY2PR02CA0107.outlook.office365.com (2a01:111:e400:5261::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Fri, 1 Sep 2017 16:55:04 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT022.mail.protection.outlook.com (10.152.77.153) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Fri, 1 Sep 2017 16:55:04 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:57482 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDj-0000Pr-Gy; Fri, 01 Sep 2017 09:55:03 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dnpDj-0003lD-DQ; Fri, 01 Sep 2017 09:55:03 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v81Gsvdg028991; Fri, 1 Sep 2017 09:54:57 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDd-0003fM-81; Fri, 01 Sep 2017 09:54:57 -0700 From: Alistair Francis To: Date: Fri, 1 Sep 2017 09:51:21 -0700 Message-ID: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23296.003 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(33646002)(189998001)(2950100002)(2351001)(36756003)(5003940100001)(305945005)(50986999)(106466001)(36386004)(76176999)(6916009)(6666003)(50226002)(110136004)(77096006)(8936002)(118296001)(8676002)(81166006)(81156014)(63266004)(478600001)(9786002)(4326008)(48376002)(54906002)(356003)(626005)(5660300001)(50466002)(47776003)(39060400002)(2906002)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB1929; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT022; 1:YvldCsy9Q87GHNhLMFjn2eKwMTM/0aM+nK5m9zGpLVgL/taWJR8Xs31ffepD9PWclV14NyJbqkscA3ypObXTN2PYOYNwZrU9mzxv2jgqPj0IySMpSB6xyJN9RwnlSM6U MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 15155e24-f806-43a5-87c9-08d4f15a3163 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR0201MB1929; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1929; 3:UhgYGVOKZO7jcGh++USgE74NI0OdEo0mHCM7148PJaPokokKJQEQWtUl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tIYTDBEXjrv+J7nhLzjXN2YmVyehIBLrhixvdKELbqjK0DwgX+8FizX82rLmJTQ1Rkx72wnp8mr/8nxVbQLXsMUgeqkCeqejTS2/p85aHDoKUpRdeyaqsE33kmbfOJx4LahjvbF+WOxTxNA93SJIpaiiRK6UWTF7oLfnfsC7dFCrcabx4b6AUPCJgt/RJh4qo9rQG1y7SM72HINsEuaiyWaM7Kxhc02qLh+TxuO/SkkH7HdvBfmbI7bT04WwvGjlwRV3UpJf9pAFFZRdkm/ve5t3X+sXxyoy+K+C/j09vHFsig51rlBhyBlQMgbS23wrDZTPhPhUEAY3VsjXBT7RzMhQtX096E5V4SETZmNilZXWhBxRzdsM/wS/RYj3pTpBLfxjaA3ayRvNqnYS6X5i2Vx9yCIfJVNm X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(93006095)(93004095)(10201501046)(6055026)(6041248)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0201MB1929; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0201MB1929; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1929; 4:1m6GX0O78wxuprWSYZns0M5rqvoBUS4yVnFgH3UOfmTHLZ/4oY+RIVTSXr1DiFJABk7Ae8wOvVl+GffeWPBrBdRIDHmqyT56UneYnrlASsh3iu/VGGfisnIsJ0jvrHEtfI6gxo0gskDyPFBXgHf3lQS5uJcGGUgSz5dQPx0WQIeOodW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rg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2017 16:55:04.0914 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB1929 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.40.66 Subject: [Qemu-devel] [PATCH v3 5/7] General warn report fixups X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com, pbonzini@redhat.com, armbru@redhat.com, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Tidy up some of the warn_report() messages after having converted them to use warn_report(). Signed-off-by: Alistair Francis Reviewed-by: Markus Armbruster --- block/vvfat.c | 3 +-- hw/arm/vexpress.c | 2 +- hw/i386/xen/xen-mapcache.c | 2 +- hw/mips/mips_malta.c | 4 ++-- hw/mips/mips_r4k.c | 3 +-- hw/s390x/s390-virtio.c | 7 ++++--- net/hub.c | 6 ++---- net/net.c | 5 +++-- target/i386/hax-mem.c | 5 ++--- target/ppc/translate_init.c | 3 +-- ui/keymaps.c | 3 +-- 11 files changed, 19 insertions(+), 24 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index 04801f3136..55f416868a 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -1227,8 +1227,7 @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags, switch (s->fat_type) { case 32: - warn_report("FAT32 has not been tested. " - "You are welcome to do so!"); + warn_report("FAT32 has not been tested. You are welcome to do so!"); break; case 16: case 12: diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 2445eb4408..fa53cf96b4 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -492,7 +492,7 @@ static void vexpress_modify_dtb(const struct arm_boot_info *info, void *fdt) * happen with older device tree blobs. */ warn_report("couldn't find interrupt controller in " - "dtb; will not include virtio-mmio devices in the dtb."); + "dtb; will not include virtio-mmio devices in the dtb"); } else { int i; const hwaddr *map = daughterboard->motherboard_map; diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c index 91a4fd6984..baab93b614 100644 --- a/hw/i386/xen/xen-mapcache.c +++ b/hw/i386/xen/xen-mapcache.c @@ -127,7 +127,7 @@ void xen_map_cache_init(phys_offset_to_gaddr_t f, void *opaque) if (rlimit_as.rlim_max != RLIM_INFINITY) { warn_report("QEMU's maximum size of virtual" - " memory is not infinity."); + " memory is not infinity"); } if (rlimit_as.rlim_max < MCACHE_MAX_SIZE + NON_MCACHE_MEMORY_SIZE) { mapcache->max_mcache_size = rlimit_as.rlim_max - diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 233e2ee802..b8ba684c93 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -216,8 +216,8 @@ static void generate_eeprom_spd(uint8_t *eeprom, ram_addr_t ram_size) } if (ram_size) { - warn_report("SPD cannot represent final %dMB" - " of SDRAM", (int)ram_size); + warn_report("SPD cannot represent final "RAM_ADDR_FMT"MB" + " of SDRAM", ram_size); } /* fill in SPD memory information */ diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index 6ffb88fd70..b48a4d72ac 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -254,8 +254,7 @@ void mips_r4k_init(MachineState *machine) } } else if (!qtest_enabled()) { /* not fatal */ - warn_report("could not load MIPS bios '%s'", - bios_name); + warn_report("could not load MIPS bios '%s'", bios_name); } g_free(filename); diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c index 964df517b4..946f23fc23 100644 --- a/hw/s390x/s390-virtio.c +++ b/hw/s390x/s390-virtio.c @@ -146,9 +146,10 @@ void gtod_save(QEMUFile *f, void *opaque) r = s390_get_clock(&tod_high, &tod_low); if (r) { - warn_report("Unable to get guest clock for migration. " - "Error code %d. Guest clock will not be migrated " - "which could cause the guest to hang.", r); + warn_report("Unable to get guest clock for migration: %s", + strerror(-r)); + error_printf("Guest clock will not be migrated " + "which could cause the guest to hang."); qemu_put_byte(f, S390_TOD_CLOCK_VALUE_MISSING); return; } diff --git a/net/hub.c b/net/hub.c index 745a2168a1..14b4eec68f 100644 --- a/net/hub.c +++ b/net/hub.c @@ -310,8 +310,7 @@ void net_hub_check_clients(void) QLIST_FOREACH(port, &hub->ports, next) { peer = port->nc.peer; if (!peer) { - warn_report("hub port %s has no peer", - port->nc.name); + warn_report("hub port %s has no peer", port->nc.name); continue; } @@ -334,8 +333,7 @@ void net_hub_check_clients(void) warn_report("vlan %d with no nics", hub->id); } if (has_nic && !has_host_dev) { - warn_report("vlan %d is not connected to host network", - hub->id); + warn_report("vlan %d is not connected to host network", hub->id); } } } diff --git a/net/net.c b/net/net.c index 45ab2a1a02..5e5e27f7e0 100644 --- a/net/net.c +++ b/net/net.c @@ -1482,8 +1482,9 @@ void net_check_clients(void) QTAILQ_FOREACH(nc, &net_clients, next) { if (!nc->peer) { warn_report("%s %s has no peer", - nc->info->type == NET_CLIENT_DRIVER_NIC ? - "nic" : "netdev", nc->name); + nc->info->type == NET_CLIENT_DRIVER_NIC + ? "nic" : "netdev", + nc->name); } } diff --git a/target/i386/hax-mem.c b/target/i386/hax-mem.c index 756f2dd268..ad1248fece 100644 --- a/target/i386/hax-mem.c +++ b/target/i386/hax-mem.c @@ -178,9 +178,8 @@ static void hax_process_section(MemoryRegionSection *section, uint8_t flags) if (!memory_region_is_ram(mr)) { if (memory_region_is_romd(mr)) { /* HAXM kernel module does not support ROMD yet */ - warn_report("Ignoring ROMD region 0x%016" PRIx64 - "->0x%016" PRIx64 "", __func__, start_pa, - start_pa + size); + warn_report("Ignoring ROMD region 0x%016"PRIx64"->0x%016"PRIx64"", + start_pa, start_pa + size); } return; } diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 989c104b76..be09aadfd9 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -9230,8 +9230,7 @@ static void init_ppc_proc(PowerPCCPU *cpu) } #endif if (env->check_pow == NULL) { - warn_report("no power management check handler " - "registered." + warn_report("no power management check handler registered." " Attempt QEMU to crash very soon !"); } } diff --git a/ui/keymaps.c b/ui/keymaps.c index a6cefdaff9..f9762d1497 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -198,8 +198,7 @@ int keysym2scancode(void *kbd_layout, int keysym) if (keysym < MAX_NORMAL_KEYCODE) { if (k->keysym2keycode[keysym] == 0) { trace_keymap_unmapped(keysym); - warn_report("no scancode found for keysym %d", - keysym); + warn_report("no scancode found for keysym %d", keysym); } return k->keysym2keycode[keysym]; } else { From patchwork Fri Sep 1 16:51:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 808830 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="eaBpLmXM"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xkQNz344Fz9t2x for ; Sat, 2 Sep 2017 02:56:03 +1000 (AEST) Received: from localhost ([::1]:50051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpEf-00065P-GU for incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 12:56:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpDr-0005zK-OJ for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnpDo-0006Ab-Jl for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:11 -0400 Received: from mail-bn3nam01on0080.outbound.protection.outlook.com ([104.47.33.80]:29184 helo=NAM01-BN3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnpDo-00069V-Dc for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=k2PxPrWywN2N7G3A33h0PBrWaO+d3FUHev2kIVVj27g=; b=eaBpLmXM/j711PlJKuKboiu2Do26yLIidCJi3NNeIoARCVpmtwRw3WjMWXZTVXOl+pbNZBAi/MrpSza5eXPF8jEkcCeQuhrSIAWCnVQL7TlrjUZn1b4Walj2Qw2G29ZvdrUmiITeRxNXlsQHq5zZPSLYgm0oWA1OM5dOEG9DFBA= Received: from BN6PR02CA0083.namprd02.prod.outlook.com (10.161.158.24) by SN1PR0201MB1936.namprd02.prod.outlook.com (10.163.87.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 1 Sep 2017 16:55:06 +0000 Received: from CY1NAM02FT061.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::201) by BN6PR02CA0083.outlook.office365.com (2603:10b6:405:60::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Fri, 1 Sep 2017 16:55:06 +0000 Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT061.mail.protection.outlook.com (10.152.75.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Fri, 1 Sep 2017 16:55:05 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDk-0002as-OS; Fri, 01 Sep 2017 09:55:04 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dnpDj-0003lD-HU; Fri, 01 Sep 2017 09:55:03 -0700 Received: from xsj-pvapsmtp01 (smtp3.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v81Gt0p8009921; Fri, 1 Sep 2017 09:55:00 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDg-0003fc-99; Fri, 01 Sep 2017 09:55:00 -0700 From: Alistair Francis To: Date: Fri, 1 Sep 2017 09:51:24 -0700 Message-ID: <54a0a76ab505ffdc34e995bae5ddb9f5f282328d.1504228916.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23296.003 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(2980300002)(438002)(199003)(189002)(50986999)(63266004)(305945005)(2870700001)(626005)(54906002)(2351001)(118296001)(4326008)(106466001)(23676002)(8676002)(81166006)(81156014)(5660300001)(76176999)(2906002)(36756003)(356003)(36386004)(2950100002)(6916009)(5820100001)(50226002)(6666003)(8936002)(189998001)(478600001)(9786002)(77096006)(50466002)(39060400002)(33646002)(47776003)(110136004)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0201MB1936; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT061; 1:000OYmbKprFyvQOkEPFyIkM1iGC1NEZtJGDbCpKpHdsqsSdGi8xycfpGAgPkmVTgBB00bY9okajFO/Sn4nCtyJay4d7RjvO+VKm5/jLteYw6VcHlBUfnRO+ccTEmjy4d X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 25147ca9-136a-4d82-49df-08d4f15a3225 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR0201MB1936; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1936; 3:mhc2fBgrmw9xoldKdGRJ0iFfoLHOfx96MC0SYw5iSS99lLMzj4G7UH8esVsYM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N5BVN2BGzdeu51Wk7dQEf+z1rmoy7iHN2CRzsKDVoSah/QcEJbPlUP0NdH/Z3T0xqv2HASR3bNO08N+Qc5Bf5padtV63Si4S1oGwEpUMICoGiYscT8T71S2k94O+ugDAAyPrCUNWLM8byU/5kUbEpg+4J3Ne52APHEPp7IwwStKJQljNfOnJyLDXkZrHbbqPBp94zF47GibL8BNCmfJMgFExLP0l7IoOutNniTr9OTNry0I5Tzwz84z7MFfXOnc8lI5elp7iaPe3EeoMTHaMDCWo9WLMi2PS5P2B90VNTauJqE3mWmTxltuWLPXrZGVhEHkjtwL118aPJE4dC5xUsQ8/6kNab8eys4hhHsxg6coyN6ggyY7uHDx6J2CeVBc3kBnrYz X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93004095)(6055026)(6041248)(20161123562025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0201MB1936; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0201MB1936; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1936; 4:wjvAXgSpRc1fH3O5y3FMUoU4K7WXcI77oliQSUrX4LRdEfzGLbNPYX3lPp2FQElVQR1YkkNmmI+K3KA8Tveas76jwUS2croT8FuMy00O+3zDBTRHt+pfiymd0G885h7eQ7DThj9DETXKdLLt7U8Yd3tY/C2+PTnrGKvIkEvqWgzsgn+vtDvYRis2U+8fvYjOO2nddKH6cDYnqaBirv8idf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zadxB/6R8Jj1jN76j846mFR71btk/LPOE0ri2LJbumEOXZ34F/mFHLGrOWvoIxZOyh218hu0g2zTY4eTpaWIivNR8tmMqoSX9knaTQEj8PsOERkWEevaSw0E+mAPuOTGJnTJQ== X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1936; 6:FrrvU2P/YyACRqd2U3iAsnaNhs1eNriOI+JByf/leAiiQXZloZeUGMek7FIU48a3fh608MWTz8BZlesjGzLRtXvot9AoUCSFYafSyiNEkx2w2V83IsZc7+0SxzndyZiwUE8cWCoWUy/eaALiPGyUG/7WmCm+3MZHtyKiz+rTwxT5v5S7Mh5EKiZHwIYK+qRxCF3WY9Wb/LsQGbZl6nUNjStjIKR7S9qR+jakTE2DHR+EPMiovjSFOLzrhk0t91AJwLOVdZK/QfMxeFA8MSzbLKugR0fbWbqpmN5Y+o4oJAJCVCSGPw7a8ZyhvZhfVM/cOEWGYaapjRCYXQzLsvBOhg==; 5:bC+qAXRBAnD/WP577NGfqutNo/MSZXi3GEe3hQbQVku9YmE094h9Tm4aevf/SCjo24SaGSyyFb5G/+32Swerb5NrIGVYgNIfaBQFGyViGzkvn3rzZg8NK4FGnAITk9ZFey+e6fIdVrmJ28vqF+D5CQ==; 24:9tkNdZgoqCAJAjaPWS+1KPrZSk0TcuvVcTbU1YFWN7poPqw9Jn4mpCNvZ0qBnDVUaQsozngE4I9/64s21u4z4rECraLKNY00dzn0dq/rt9M=; 7:B0xe0jiCH3KtIi0YE4weZhLAhLVHGsHgUrzyfFkOCHZsSLqHAybnfZ0Tdh2vGJCAAQGwklvksrXswNRFE2czXF9tG6kVvAgcHEyK+MAbGbExccHGdMVBXOV0I0oL64jqdjn+ZZlNbmGvFbLBz+u56/5UiL2aiehUHDkcM4U5K7SUDGDQALYGULcLJx26vTO2GYXeUh64GeuDVCcp5kk8iBnWJtCasGn3Qgtrf62og0Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2017 16:55:05.3612 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0201MB1936 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.33.80 Subject: [Qemu-devel] [PATCH v3 6/7] Makefile: Remove libqemustub.a X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com, pbonzini@redhat.com, armbru@redhat.com, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Using two libraries (libqemuutil.a and libqemustub.a) would sometimes result in circular dependencies. To avoid these issues let's just combine both into a single library that functions as both. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé --- V3: - Fix up the docs - Rebase into this series V2: - Skipped Makefile | 7 +++---- Makefile.target | 2 +- docs/devel/build-system.txt | 16 +++++++--------- tests/Makefile.include | 6 +++--- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 81447b1f08..f111e93c63 100644 --- a/Makefile +++ b/Makefile @@ -344,7 +344,7 @@ subdir-dtc:dtc/libfdt dtc/tests dtc/%: mkdir -p $@ -$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) $(chardev-obj-y) \ +$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \ $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY)) ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) @@ -364,12 +364,11 @@ Makefile: $(version-obj-y) ###################################################################### # Build libraries -libqemustub.a: $(stub-obj-y) -libqemuutil.a: $(util-obj-y) $(trace-obj-y) +libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y) ###################################################################### -COMMON_LDADDS = libqemuutil.a libqemustub.a +COMMON_LDADDS = libqemuutil.a qemu-img.o: qemu-img-cmds.h diff --git a/Makefile.target b/Makefile.target index 7f42c45db8..0a80caf79c 100644 --- a/Makefile.target +++ b/Makefile.target @@ -193,7 +193,7 @@ all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y) $(QEMU_PROG_BUILD): config-devices.mak -COMMON_LDADDS = ../libqemuutil.a ../libqemustub.a +COMMON_LDADDS = ../libqemuutil.a # build either PROG or PROGW $(QEMU_PROG_BUILD): $(all-obj-y) $(COMMON_LDADDS) diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt index 2af1e668c5..0d54294cb1 100644 --- a/docs/devel/build-system.txt +++ b/docs/devel/build-system.txt @@ -232,15 +232,13 @@ The utility code that is used by all binaries is built into a static archive called libqemuutil.a, which is then linked to all the binaries. In order to provide hooks that are only needed by some of the binaries, code in libqemuutil.a may depend on other functions that are -not fully implemented by all QEMU binaries. To deal with this there is a -second library called libqemustub.a which provides dummy stubs for all -these functions. These will get lazy linked into the binary if the real -implementation is not present. In this way, the libqemustub.a static -library can be thought of as a portable implementation of the weak -symbols concept. All binaries should link to both libqemuutil.a and -libqemustub.a. e.g. - - qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a libqemustub.a +not fully implemented by all QEMU binaries. Dummy stubs for all these +functions are also provided by this library, and will get lazy linked +into the binary if the real implementation is not present. In this way, +this static library can be thought of as a portable implementation of +the weak symbols concept. All binaries should link to libqemuutil.a. e.g. + + qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a Windows platform portability diff --git a/tests/Makefile.include b/tests/Makefile.include index 37c1bed683..80527a8763 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -553,7 +553,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests # Deps that are common to various different sets of tests below -test-util-obj-y = libqemuutil.a libqemustub.a +test-util-obj-y = libqemuutil.a test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y) test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \ tests/test-qapi-event.o tests/test-qmp-introspect.o \ @@ -608,8 +608,8 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \ $(test-io-obj-y) tests/test-timed-average$(EXESUF): tests/test-timed-average.o $(test-util-obj-y) tests/test-base64$(EXESUF): tests/test-base64.o \ - libqemuutil.a libqemustub.a -tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o libqemustub.a + libqemuutil.a +tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o $(test-util-obj-y) tests/test-logging$(EXESUF): tests/test-logging.o $(test-util-obj-y) From patchwork Fri Sep 1 16:51:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 808833 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="aqY7LpN0"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xkQRb0G50z9t2x for ; Sat, 2 Sep 2017 02:58:19 +1000 (AEST) Received: from localhost ([::1]:50088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpGr-0000A7-6F for incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 12:58:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnpE0-000676-E0 for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnpDx-0006FD-C0 for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:20 -0400 Received: from mail-co1nam03on0071.outbound.protection.outlook.com ([104.47.40.71]:35588 helo=NAM03-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnpDx-0006Ej-1b for qemu-devel@nongnu.org; Fri, 01 Sep 2017 12:55:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=f5rwm1ZeI6SK39gRx0DMzWWvG+KucO/y3/BafvjBzHc=; b=aqY7LpN0KP1ILcE+CzCNR3QCoxjxP2GKRFR5d1ym76Rdoh4eYF3w0WlB7sLh3VZSFL8OiCmKZ7gmoWUcQnTIIth0ehC3llbIDWZO+H1c7w6PsrdtkOb5hrz29jtyZJ+Z+AMrz8S6CGwthmsOtJ4inqR1+XvMeWSAXeZFKI5VGO4= Received: from BN6PR02CA0040.namprd02.prod.outlook.com (10.173.146.154) by SN1PR0201MB1935.namprd02.prod.outlook.com (10.163.87.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 1 Sep 2017 16:55:14 +0000 Received: from BL2NAM02FT016.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::209) by BN6PR02CA0040.outlook.office365.com (2603:10b6:404:5f::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Fri, 1 Sep 2017 16:55:14 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT016.mail.protection.outlook.com (10.152.77.171) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Fri, 1 Sep 2017 16:55:14 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:58168 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDt-0000Q5-Nn; Fri, 01 Sep 2017 09:55:13 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dnpDt-0003v6-Kk; Fri, 01 Sep 2017 09:55:13 -0700 Received: from xsj-pvapsmtp01 (mailhost.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v81Gt4JZ029111; Fri, 1 Sep 2017 09:55:04 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dnpDk-0003mu-2a; Fri, 01 Sep 2017 09:55:04 -0700 From: Alistair Francis To: Date: Fri, 1 Sep 2017 09:51:27 -0700 Message-ID: <852ce10cbd36276fe5207539cd2dcd77aac6c938.1504228916.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23296.003 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(2980300002)(438002)(199003)(189002)(5820100001)(36756003)(356003)(76176999)(8936002)(50986999)(54906002)(23676002)(6916009)(6666003)(626005)(2950100002)(63266004)(305945005)(106466001)(2351001)(9786002)(33646002)(478600001)(47776003)(50226002)(77096006)(5660300001)(39060400002)(2906002)(110136004)(2870700001)(4326008)(189998001)(50466002)(81156014)(8676002)(36386004)(81166006)(118296001)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0201MB1935; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT016; 1:ZfO5M0V8Lxlb5aBe6iiHN4k1NOtZ2VE4Vp+PaQMWTcGSWT3IJ3sCnXFfbOxDeptIMejBGDCWr0ESSWX/4T9LwFhHl9HLIG9RgBfcz8aFnnRmQIetLVioe3f9eYnMomaM X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 10cf9ab9-20cb-4519-99e8-08d4f15a3797 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR0201MB1935; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1935; 3:Dz7/I8SYaJ/aBXnFjZkzT/y8+N7tq5/Mjm27NcZXjX/DLZc4H8TCjowI/h5LDETPioaLRF7PZ0d+G2TSjfSIUL9/fMhA1Xa5m3D7NtIW272ndaEqXo0b2BLmMyJe9b5VGgG1Fz08NwVscR5Szo9PwfuIglicgOCGfJOvvHFY4/BvEuMip7sK/N7OUUQN8/mPkkLE5wzP7WhR432Xb6EJsQKfI4luH5eMU71bUtsxB+D8jv/EAIwsKncOnwMss7IcrRuqAjznwz+cYpgmbRF6oo3volTPMnhZODlfWQXCzzz76q0Ecskh0SH6NVt65lwU4wc586SNLLItugr+1TnCCCuJ6RodtEvwV0FqxB9ABGI=; 25:S5sMesSTrEb/4Pk0QEqmC0Mpxik3flQdtgI1TkQHk0XVvaa8Ez+7sXlr3uqzjp4G3XEMCtri8ls5hXzMBIP2q6pWUDGp75vnmumIASJWcE8OkKA1UJY+Poe1MWabLd5vS6ZLjpXS72+r+h5hmEM1Zr3z7kV8cYPxqo1EtXpnRHPM+SNPBdHE9M9/xHykUjP+fdkW+QOY1BaY6YcnTeS6nE9RKQznSwdoy2hJRIqgVI4wtYtCeJtpnYfTpmM1wzKq6IHYQYqx9v1Z7qTV9sHQEow7NGCyONvfjmKb0RmtXeY63ZN2A4K5sIsJmbts31PwwPamlsF1WSeNCUQrQvRURA== X-MS-TrafficTypeDiagnostic: SN1PR0201MB1935: X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1935; 31:pdCegsohQRUeImKweS0T5E0EM71LZJPAD4J3b8GC2gWOfDRvtNMqvsZgz3lpwgkXJiNzXuVrOOkt881kaIjLu0n2nRgWVO9rrWXB9/rcXjQqJRQBFqMlz1pEtlh2r/6HTzDjd9B2V1G8/kUuJw/FTbHT6c68C6V9xNqSO0LjIU7v03MzVd7129ZIOMTEZ8LHmRGPwSBstf40IjADWz8HIfSdakXAprM3g0DsR8YksiI=; 20:8Z6b9K9QfDX2dLgVM11OqkRFI6O+utH44ivZO1TQN3XkDJluslpCyJzGij0KMriINzAcWLcwY97Rw2inENY/QrytWgiL+6Z68ItJQMr94mVm5irgPVFuXgCMj2qYSyswVY/8aNHrHFqqpTm+Z1cV0ETVz1pU23OJtcV2cbP5ROikk6/Yz8EMAKJbUoM/YBrvGfDyfgjBxrWzUNaOdiiBxEpIiLWJBQF/713src7DohUzxwuOu4R5hojmwnhvsxK/K6cmY2D+inxpQuvaHKoul6jK60vM9aDWGejFPGKQjPonwvqQdwp5YbKi22yD79tFynSyQZRnMTMrP0Pst2C9pQycW7wqV08LOg//Ub55ysNvwSk4WRIYaaAsUoVIqxmJHolHjyPxyfEHMsujiAS22Lnbt5sLDO6k0W41VHqAUYDDwxa9eryDpyzhaqzJZtIilycjnfeJCwc0Xi++VRjkS5jqbslIJYDeKRiNFmXndZuS146UItR3PWQToyLcdSD+ X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(100000703101)(100105400095)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0201MB1935; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0201MB1935; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1935; 4:qtQDmFeVbMIOMC/VAS3orUYWeYXSeygCNcfsSnatYjQ2Y9s+T2id5xWQAd2IQ3IyyFP4ufnjIUX81O8kPS0XQG/oDL+obJ3Ob/AyuXkRkylqnslmPYctQBomU+m8AuXWeO3vU2CdM3QEmBJfNCSFfwpfRz+4shUAuenISfcPXr9DJghzdd0tDimAl4v0VDWa04SSqqVNfAL4QgmJlayxsQAUxzwet1qHryrNnMUewaL0sXMLnu0uWmV4qj29UoiXi65U2d07WzakPPe7GQ4WhTbKfdDn5Qde3qDDoVGn5UU= X-Forefront-PRVS: 0417A3FFD2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0201MB1935; 23:frD8ftih3LQ8Naku//Irjass+CZS3N1Xz0/C6sH?= SVkcLeBr5DiJgs7SAegfI1yqy86IEkMYncC+EPvIZ3Crwm8Nd+XmmG/lJAmvbEhjEYDnZBu/J1PxwZeZcJbo8WNFrwGdmPOvehU9MiWYx/MeCIHxyCQxhLYw6HW2X08vjqChgzOoDIR+OA/b28OwXnfcXFBG8KXjiEBsAbIIyjbhHjVUaIaA/Adx4rpFjZpNRRbVorsRrIDd/afay2kYGJCZ9rORY5oD7eqgea7aq3mIwQqyggEYjCVgA7c437/VjUt7VEHizE6AFpSHL2hqF73pxJOOsU1EoU30DRzPcpJ7lvQdOJwhvIGeFV12zn+/QWJpwpY9vHAwf82+aS+WXuMphqooT0oJ5I8wWwTCl2k8MAVCN0rD0olPrD9YVse81RKHOKgki/zee8LZjADnDePYrh8oRVx2wxwJr97xNmiOByuY26JPJezZsdvOaIMgDQWc5Mbn8T+momzQCynXzcy/cOdEL39KWaOOMzTas7OMhTvUakoannhNFcPlrHSZrxziLv/9K74EoDQH4N/9XEixoIhbg0K9wZq5zprok9WQBq/ccUvNffHOqkdtQz7qVH3351HSHeMPRtZBWDzKa7dDwTPIPBprhjah0X+5AQXAjQfMCPpMbiXgaMrABIlR+BnHl4x4zg8RAHNreF7rNi0h+oJmflldRHN5goULO8tFY4lYnMixQI5dTK8iT3LzSH2bYe3XWly0DhF6p7wQbjc1W4IWtSVPZQY9NHfdKVYl92OviEZzuiFYKZsGCEnK5p6dvp5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Xj0+5hHKAdF67QrBjvXg/b8GDjLm6NaRKtYDxKxdsVR9n7JfylswtxdJMXKgsEgLIRU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2017 16:55:14.6240 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0201MB1935 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.40.71 Subject: [Qemu-devel] [PATCH v3 7/7] Convert remaining single line fprintf() to warn_report() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com, pbonzini@redhat.com, armbru@redhat.com, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Convert any remaining uses of fprintf(stderr, "warning:"... to use warn_report() instead. This helps standardise on a single method of printing warnings to the user. All of the warnings were changed using this command: find ./* -type f -exec sed -i 's|fprintf(.*".*warning[,:] |warn_report("|Ig' {} + The #include line and the chagne to the test Makefile were manually updated to allow the code to compile. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster --- This pattern matches any case of fprintf(stderr, "warning:"... and is the most open pattern match in the series. tests/Makefile.include | 2 +- util/cutils.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 80527a8763..91d5a4544f 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -584,7 +584,7 @@ tests/test-iov$(EXESUF): tests/test-iov.o $(test-util-obj-y) tests/test-hbitmap$(EXESUF): tests/test-hbitmap.o $(test-util-obj-y) $(test-crypto-obj-y) tests/test-x86-cpuid$(EXESUF): tests/test-x86-cpuid.o tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o migration/xbzrle.o migration/page_cache.o $(test-util-obj-y) -tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o +tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o $(test-util-obj-y) tests/test-int128$(EXESUF): tests/test-int128.o tests/rcutorture$(EXESUF): tests/rcutorture.o $(test-util-obj-y) tests/test-rcu-list$(EXESUF): tests/test-rcu-list.o $(test-util-obj-y) diff --git a/util/cutils.c b/util/cutils.c index 1534682083..b33ede83d1 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -30,6 +30,7 @@ #include "qemu/iov.h" #include "net/net.h" #include "qemu/cutils.h" +#include "qemu/error-report.h" void strpadcpy(char *buf, int buf_size, const char *str, char pad) { @@ -601,7 +602,7 @@ int parse_debug_env(const char *name, int max, int initial) return initial; } if (debug < 0 || debug > max || errno != 0) { - fprintf(stderr, "warning: %s not in [0, %d]", name, max); + warn_report("%s not in [0, %d]", name, max); return initial; } return debug;