From nobody Tue Feb 10 02:55:43 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15051600622191020.5986856443707; Mon, 11 Sep 2017 13:01:02 -0700 (PDT) Received: from localhost ([::1]:60239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drUtB-0001H7-5t for importer@patchew.org; Mon, 11 Sep 2017 16:01:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drUov-00062K-HK for qemu-devel@nongnu.org; Mon, 11 Sep 2017 15:56:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drUor-00024r-Ob for qemu-devel@nongnu.org; Mon, 11 Sep 2017 15:56:37 -0400 Received: from mail-co1nam03on0051.outbound.protection.outlook.com ([104.47.40.51]:15574 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 1drUor-00023k-AU for qemu-devel@nongnu.org; Mon, 11 Sep 2017 15:56:33 -0400 Received: from MWHPR0201CA0076.namprd02.prod.outlook.com (10.167.161.17) by BLUPR02MB1124.namprd02.prod.outlook.com (10.163.79.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9; Mon, 11 Sep 2017 19:56:28 +0000 Received: from BL2NAM02FT034.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::209) by MWHPR0201CA0076.outlook.office365.com (2603:10b6:301:75::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Mon, 11 Sep 2017 19:56:28 +0000 Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT034.mail.protection.outlook.com (10.152.77.161) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.13.11 via Frontend Transport; Mon, 11 Sep 2017 19:56:27 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:45251 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1drUol-0001Pn-1X; Mon, 11 Sep 2017 12:56:27 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1drUok-0008Vd-Tm; Mon, 11 Sep 2017 12:56:26 -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 v8BJuOIS017517; Mon, 11 Sep 2017 12:56:24 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1drUoi-0008VG-JY; Mon, 11 Sep 2017 12:56:24 -0700 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=ezKPdxRF2PqD8cpBLHUB1URg9BZgPAndfVT4q+Kr1lg=; b=M8GVOV1lR/W0BZnQqJ9a0w2NfrpIasnGKmHY1ykSCs/imWSOCmOlISvJcZV9Oj+3iCc5vPAHcB8C4AaYw2gtZ14hT8JmJcPF9qo/kMw9Hz+mNuw/diRnhleGkTgMpawHm6jgV20KiCclGjD9NWyVSySYUH81/evu2nHuiX06T6k= 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 (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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; From: Alistair Francis To: Date: Mon, 11 Sep 2017 12:52:50 -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-23322.005 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)(36386004)(50986999)(2950100002)(54906002)(4326008)(6916009)(478600001)(76176999)(36756003)(6666003)(2906002)(5660300001)(81156014)(81166006)(110136004)(39060400002)(356003)(77096006)(8676002)(5003940100001)(48376002)(8936002)(189998001)(106466001)(305945005)(63266004)(50466002)(47776003)(7416002)(9786002)(118296001)(575784001)(2351001)(50226002)(33646002)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB1124; 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; BL2NAM02FT034; 1:/h+dqcJwnRYPQEy5a4BC0AD4SlQZF4dMHzTteRLz6a47h2WIXpmPtITyd6z9vZnD11BoV459aXTtQ4TWpgLTwVFwUn1NvZ4PchZwVKP7RaYqngd6YGMG4HXgnM6xw5EI MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df02b838-c63f-4fc8-b31b-08d4f94f30c4 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:BLUPR02MB1124; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB1124; 3:4/5qPB0dMCHFBx3xkqsnsDEG+pvihRRbx+xT0oUZk78qYUDgYgEUAQKzlbb3eiW3Cpvq0KDXWfm8KXyZeqI7ypHREPpb676kl15Z66KEFr2QgoDCVU3H0fgk76xgDz3Ziga4mTom6+8TmbTvXTjGmAFguNGfYhgC0s7n1y0QNS5qrj1ctyD/8j7YFopUj5soJwZcgnU1rj2aEtRzUdYnLfT/q3HNjRjFmQb5alGyNLbymUB0SwPi9xExtMhmemWjHS9AouyQesrOgvRfQVw6ZkvtOZCKLILxrsM15L96gHEj98p5KNhCdAY4aaLqnhoh+78bQ5QMh/S12dsku5Dwd+9pdw/6jMbf6Gf2Ijf8Msw=; 25:GtTG2la3uRAj6r6rfq/wAdYWJEoDEhd1kl+MALsPAOUfAnj0cvgkCiqje4E90rDz7OgrCd9G5Xm+DFr2VLHZFLzdhTD/6aPZHDz5LxmJINvqHSPgtL5qD+hVnGPBG0Q5AteYDtfQd9l28ZO/M9TR0k6DQy5YwnAUh5wYhQIp8WaIr7n8E4F8HdlRoCtzm2zKAmaHwfoGCosPi7/0f2z+F8gxWtprN+yFYUeaqwlWV4u4zyl7Ls2r3Zv4yON9+4wHtYLhNwhWSWSquwED6XRLKp6oW20Ns1WCsg0LACy0K8iINBZjTr5Fp497Hw/1TA6qGhWCX+bozoBwL4c3XqBZtA== X-MS-TrafficTypeDiagnostic: BLUPR02MB1124: X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB1124; 31:iM3rAOzhFP2EspsbNhMoTwD8a+T0wtvDFdNJFISmuktu+L7NPHtMaJhw2qF6DPX/9tPFPtt57JnY/y8DGVXE267duT8dG8NnTLldEAdrX90jciWIJWQzPOKdI4nBJxlyywzrPZyVb9xn/Lp/scSN7VTICwfL3kw1bY7HHI2afGo9uZZ/+Mdw4pHzqfvOb3ihPxQZPbwlwGCTtCJAE408MyKCntmYAVWHQyQsEB/PeoM=; 20:AGj9NLF4msMuw+M7h/8WF+nhSb3Zm0Omcl5JLPVeP6x3yQM6BO2akTIk+ss1U74WiTENSHF4v/FP/eSWAE/Uqvg+x+zj+eCuS8JrUFCCUdkhldHW1v+NoC98Y8IRIs44sk3G2rtrDwrnzpgDR8zqAQsKdP4duQjsnq7j3ryDpyOOJItW+JcWvM32GxZQwPJW+zSYJikA0N8nSM1E95PtM5gRcfKxMfu1TeLZqng9Box8vRc64ezN9c3yHiF/sflID0rbKrbmZABBWCaBKx60nXqBw7i0gUlaux+ABlbEr2nHKzDv0t7vUZyxLoaOB96bIlxUdFiNU1zUsb2MuxH0dkwXV3eOusTvyJX6DjSCyq/eICuP9vkA75+yhp7TZrgyb5bUmaL8KtIJ1kplUl4RWZ4pRg4okrBq4ja6XVvVcAcVorT8d8rJH8FDSmSiJ4ZnGhjcweDwHicDqTdFmeGcUzlhIAB1saypGYbWxCGeXfsMIFc6W5ePxORG4prgyLUI 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)(2401047)(5005006)(8121501046)(3002001)(93006095)(93004095)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123558100)(20161123562025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR02MB1124; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR02MB1124; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB1124; 4:nGbhEmP4ps1mKwkl8NljBXJMML8XKwr+BBMkY6CCVFkfQdYfFQDzU6Q3Mjxd8zsY3mh8dq6+BEs40gmIf3m3ewcOyLZZawQs24a/YjUh3XOspJuX5PaKt+NkkBF2EfpLY5Dl7YrXlekWxQqHcitmAnej1X3Dq4WoRZiqoa7ysGZoeHYxTcg0Wl4HE3OSQSDksF0xKpkFJSmoD45ttcBYHXTvYOt/Ti1pbl072tkPWFiWC9sjjBU9zr8u5iNmW3QC24QkFp+7IvQuf5+KD7ygqJ/kjPgQ5Z8rrq52q6Db6BONCdznLJiQA400V+FcFJGubcRipvTC9lw7reDnaaUlJQ== X-Forefront-PRVS: 04270EF89C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR02MB1124; 23:NdW1gNoQY0qK0gOHPwzdhYp5gzksbdh9XUoOfHZeA?= =?us-ascii?Q?TttrsvkEq4tNT7kuSaLoJHyIR6Jqrbhzd3OyAh7wq3wT5hyGWkNSp7Od6ijg?= =?us-ascii?Q?KwbAlZmgtIPY9n9N8QaZwdUatY+9l+YipruHwhlrocHgsHXv27qWdKVy3QsL?= =?us-ascii?Q?tZzokFIp/WByxT0O0svmEmAS3ODmiTK4gIh2oSY6kCVTBXmHhr+NimwRFUY9?= =?us-ascii?Q?Ycw1J1nG5d6V4gp2yQ0995ML6ejyUzeFN6aDgoDpMqv6FL6krg1EvmlTOkFO?= =?us-ascii?Q?TARWe5VCOIcHZ++s3MXhypjEQ6Hd9cpMxz1IfgM8NRAQJuytKThuhEYY64D9?= =?us-ascii?Q?6GaTpiiqWoXVsWitYMpHPK0F2FyuIX5BJsSkgCEsku8YExOtYUKvm2TN58ST?= =?us-ascii?Q?sSeGivyb2dviCfw7ic9qwJxvRy7TfkMHMSHhHmsM82j+E9hgVAvQBbSuzg6p?= =?us-ascii?Q?mVu93OWrac5ohUPN2ABmdYnFC4d7XFUbQ0w6/D0Z9SnE6u5DOgJQEPixavpW?= =?us-ascii?Q?SrrGk+SL7Rn4nCMyQ5bTIhN2VYRKVZV0Zo/A1Q2FQUZAGynwo8WXEkmuon4e?= =?us-ascii?Q?Ov0Pbb9HDq1dxjTZ01Fvcg5zhnKkwg6wFVcEUSCKPhl46DCh7suqBmqXa13j?= =?us-ascii?Q?92MDrTEOX8DdzDIfzd5vka59YKWTjeyw+le/MHhjdmaKSKIDEz04exo54qYW?= =?us-ascii?Q?2U6s1kW/ANYld+ppdsqwIvGdNltOWvhA9r2xFq621UgGPOD1H2qDCfz7+qMs?= =?us-ascii?Q?ngiUjdcq8iuHzZdPFWiwSjLVMuBohPP1Vua9jDmbpVviu94VkGBe+VIEYVqK?= =?us-ascii?Q?XW4aOB0RA1oNvbns6mH53AqJJLtxtL+WDV865MYyGvC3/d8TJB5OyTeYSpzS?= =?us-ascii?Q?zkNr4aGYbVbCwLMQE5DYZ5owVOpzn+sciKKGUEzIvOUOrkazazex1pMpVcxM?= =?us-ascii?Q?Pu2WY5bc4/k+pTOWF/c/zIGA4hQTHUTcvZtPyk3dIZ8zbHBsYWLeBOMAOGCr?= =?us-ascii?Q?sBJpA0mLxN7sDuMHdrmY/pC8RU+U2cvpnCfo5fiy5/lsw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB1124; 6:CDMFCHlHHz3sy0Zors0KXbfRIm0pg9qCpzfA5FsAre8FqB4ZJzhOBSxTJAOC/rHNy+LbFGOPJ7rbLQxW7qX0QoTus51+fHQo0t+1x0B7/O/LHdnsIl7beUzCW7g25MWPnkv6uJxJnkYFw7wkkejiTgZdVlruEt4x6Dp+rOjqbTfv9c8X9AXTYlw3+Jdr8hA1+3UIiw+TCazr0wT85fas6c7neH+wB7CDt2MUDGYaYxFACLRJS3skx7lIwohQiPnmbmbGU0YQUga8CvIFXwonwlVVmMthQkdSZVYhb6DVvxmwJDCZYIEii5QxFsKlJ6bt9lXP0g2Y4FkfXROmeSnl6g==; 5:MmvMeLDU3j+8uRWTUYnyhnShCdzAM87jb5SBrnOF8+FhTnsKARkoM8M242R1590f2QK/zcqQVSzpJeLViNHso/7+3AwUkYjmjs9/IsuYceFplFWO6GSD9EHC/qWDiiDMH29xyQR5vCycEyHBqshoGw==; 24:l/sTAWCSYO7o8WpIDXnAMX56CH8uLO+DuBoeeKjEDATusNj735GPjn7KeHybj4OkRxHMh1ZFqzwuZTxKw2z/q5F3jYb8S8s2/19iCvcRAKI=; 7:rELaNn2UAW4Lx/fr4y358ctxohF2+Uh092Oe492gupwToAI+mkoW/dz1WZ+BKgdJ/IG3ETnDNdM2iRqj3OGdfTDI9xPZoH0JPmx+odYZsnUISeshafS3Kt2ucgkhmA9uqwrLL2flDnUzTmYSuv8Vi/n1LTrPPI96rOQKzVD77BkqX/5XeB7QfWpBZW2JBP8KQyBX1wity+zrHjB52BT+ZzrPVoNcuBtjUnWxTOLV8Dk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2017 19:56:27.8731 (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: BLUPR02MB1124 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.40.51 Subject: [Qemu-devel] [PATCH v4 3/8] 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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] --- V4: - Rebase 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 ++- qga/vss-win32.c | 2 +- target/mips/kvm.c | 4 ++-- trace/simple.c | 3 ++- ui/keymaps.c | 2 +- ui/spice-display.c | 2 +- 12 files changed, 21 insertions(+), 14 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index c54fa94651..efad5750ba 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" =20 #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 wr= ite-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" =20 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 *blo= b, size_t bloblen, } =20 if (!has_header && changed_fields =3D=3D 0) { - fprintf(stderr, "warning: ACPI table: no headers are specified\n"); + warn_report("ACPI table: no headers are specified"); } =20 /* 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) =20 filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, default_dsdt); if (filename =3D=3D NULL) { - fprintf(stderr, "WARNING: failed to find %s\n", default_dsdt); + warn_report("failed to find %s", default_dsdt); } else { QemuOpts *opts =3D 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, Erro= r **errp) s->iobase + APPLESMC_ERR_PORT); =20 if (!s->osk || (strlen(s->osk) !=3D 64)) { - fprintf(stderr, "WARNING: Using AppleSMC with invalid key\n"); + warn_report("Using AppleSMC with invalid key"); s->osk =3D default_osk; } =20 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" =20 #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); } =20 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"); } =20 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" =20 #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 =3D offset; =20 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; } =20 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" =20 /* * A hub broadcasts incoming packets to all its ports except the source po= rt. @@ -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/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 =3D &cpu->env; =20 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 &=3D ~(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 &=3D ~(1 << CP0C3_MSAP); } =20 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" =20 /** Trace file header event ID, picked to avoid conflict with real event I= Ds */ #define HEADER_EVENT_ID (~(uint64_t)0) @@ -405,7 +406,7 @@ bool st_init(void) =20 thread =3D trace_thread_create(writeout_thread); if (!thread) { - fprintf(stderr, "warning: unable to initialize simple trace backen= d\n"); + warn_report("unable to initialize simple trace backend"); return false; } =20 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 name2k= eysym_t *table, int keysym; keysym =3D get_keysym(table, keyname); if (keysym =3D=3D 0) { - /* fprintf(stderr, "Warning: unknown keysym %s\n", lin= e);*/ + /* warn_report("unknown keysym %s", line);*/ } else { const char *rest =3D line + offset + 1; int keycode =3D 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) =20 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"); } =20 static void spice_gl_refresh(DisplayChangeListener *dcl) --=20 2.11.0