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/afay2kYGJCZ9rORY5oD7eqgea7aq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ZS53Wp9fnCoPzAgeb3X7QZAZVPXQQTALgtBtMUNwLPkmVF2H2v78OJRLMjISWgeVSbyG1/s+xoBuFg==; 5:/w1FEmlXL9tDkN7ueV8Vsr53Z1NNpTKQn6gaaegp3JGgjWAq/8CDvikwghOL6yxPmPWmXnfo/COShxKNwUn0NJm6Mbd4cy7sWDhVO8TIWRptUF8gUrwUwJDUUmGTJ60CZ4763Ei6NQDjlaNg10MtxQ==; 24:PfSdOAZKNRLO99F4o0LoeJ2rc4w+cNAlf67EN0mFT/MrNwWeGy2C1CmIGIAuRc1iponZmwy/7lKNt7SZm6aK4TCWjVBasY7bCGq+aPAxvlY=; 7:YlmhkU/BLixh5NVIx2Dzez3k4wosXCbSnIpry94U7yucx7I6P22MWRCKNXSIiVWZaD1AEc7vKGpzVfLacqDUmhjoA6SqkDNhJFzwATFToaluK7n3RnZsUKRV5jvdYy1ovk6C4MCE0Iz2qnkVNhcrNJnt9/As9qKwqFPFooQOXj0+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;