From nobody Mon Feb 9 14:34:34 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 15101840052795.504125895028778; Wed, 8 Nov 2017 15:33:25 -0800 (PST) Received: from localhost ([::1]:34460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCZqH-0008AF-6R for importer@patchew.org; Wed, 08 Nov 2017 18:33:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCZMm-0000hv-8h for qemu-devel@nongnu.org; Wed, 08 Nov 2017 18:02:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCZMk-0003gX-A8 for qemu-devel@nongnu.org; Wed, 08 Nov 2017 18:02:40 -0500 Received: from mail-cys01nam02on0048.outbound.protection.outlook.com ([104.47.37.48]:64288 helo=NAM02-CY1-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 1eCZMe-0003dq-DX; Wed, 08 Nov 2017 18:02:32 -0500 Received: from CY4PR02CA0028.namprd02.prod.outlook.com (10.175.57.142) by MWHPR02MB3390.namprd02.prod.outlook.com (10.164.187.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Wed, 8 Nov 2017 23:02:29 +0000 Received: from BL2NAM02FT005.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::202) by CY4PR02CA0028.outlook.office365.com (2603:10b6:903:117::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.218.12 via Frontend Transport; Wed, 8 Nov 2017 23:02:29 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT005.mail.protection.outlook.com (10.152.76.252) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.197.9 via Frontend Transport; Wed, 8 Nov 2017 23:02:28 +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 1eCZMZ-0001N8-On; Wed, 08 Nov 2017 15:02:27 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1eCZMZ-00035r-Li; Wed, 08 Nov 2017 15:02:27 -0800 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 vA8N2JCx010261; Wed, 8 Nov 2017 15:02:20 -0800 Received: from [172.19.2.220] (helo=xsjalistai50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1eCZMR-000333-OM; Wed, 08 Nov 2017 15:02:19 -0800 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=W4RR4JImDTFOQDQNPLAT/1eaScgfpLlScu30dLpLbSY=; b=TuN4iQCjgciQubzqFJbrAp2zevQcEjffYORnc/402sh2XQwjUQ2LaNBqswYwMJ1RToLeg4bC3+ULysdVq+Rd4UTwDKv2rixsE/WmIWlMVoi9kk7/g9WuuQ2bjl2SmJpUYWTtZ2z2/rwFgBdhMVTi89SaJhXEA7fVfJ4SN4pVsQw= Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; From: Alistair Francis To: Date: Wed, 8 Nov 2017 14:58:21 -0800 Message-ID: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23450.000 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)(376002)(346002)(39860400002)(2980300002)(438002)(189002)(199003)(50226002)(356003)(106002)(2351001)(5003940100001)(50986999)(76176999)(77096006)(36756003)(478600001)(9786002)(39060400002)(106466001)(316002)(33646002)(16586007)(54906003)(189998001)(2906002)(36386004)(8936002)(63266004)(305945005)(50466002)(6666003)(81166006)(8676002)(81156014)(4326008)(48376002)(5660300001)(118296001)(6916009)(2950100002)(47776003)(21314002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR02MB3390; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT005; 1:b4CGO8JHBrg0G2IBUyU0V1P/hQQ+md6q2CY20g3BgBKlkU+rkWbKHEBTx+S1+cvHRoOR3ItshqiilWL5+iBQRGSsJkNx36pOojdt4o8Bb6jnxAu2cjXrgAcvVZQlYoMP MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7b9fcc7b-e6c7-4e1e-fca5-08d526fcc92d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603249); SRVR:MWHPR02MB3390; X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB3390; 3:ba1YMH8JDEevlz4gvEd5QDV2d4fvpaZ4WB1tY4kssFXSXTk1P4DAxnNipJCwAQT+MpYnHRdC1YrR4dPucYZdQU380CrARHIB4/6q6RkpuQti7Myzout6JdkLERPx+sF9m/ScnKJNHvzb5+uH7gOSWuP7dQDmcRggK5kBLL5PXBpMGb90venZDxBZkC9w5JfzCN1jm41bxGORPiM4nJ4NMUTxXXMG4iCBW83u3i7xaVHWLvigGeXLNBSj22wSA/3cs14PIce0w/oGUoAZmqcTdKnyoNB/4Ln64jTc82274AkT9fZNEOJwD1tPvHu0jpS+LUmeHXoHex/jhfUEPTV+OntKC6VpEmaL1mxvIA3lX5o=; 25:18vIDLof9BfMbr4DPdyPLCeCLYoqM64VF+uFMLAVa+jTSZDVZx1XR5A2PbZPHS08NnnRvHytFeGxHIAaFMiuqjZdJWjUCBz87TsMM0PnO1jBYkVHbhKCvj6OhB1pLXRynK4JzjfFUVCiD4dPOEthgKoG9s8T0pmA+sCIZ5K0tOR8PMdiCvj64TC6ZumqN6uJVa5jU+Dq/+kdXK5dP+i0oGuGMk/kNeT1WgUKBV80lE3PJ5mlwKTTLTg8b1YGfUZXqyoDx/qyyUEXEQkiKCrDbK3FHx69nm8qOalDSCzy+iiWKQVq/bwxqE3H44IEiA9//psfMn5h0ad4i/lZkowMgg== X-MS-TrafficTypeDiagnostic: MWHPR02MB3390: X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB3390; 31:Oi6SCOSCVOmiVAI/aKdDU2hLuIOAIg19XfgEzm8ojATayj3Kv2WcFGbTmlwjnLBJzbSf9kelXgh7WP48m/RsRjDqoCuULu6pof/xpKHy3zimFT2/tpAMKbP0cc1TlymkKlJK5c7TxN9HfX/ula4i2PwTGeZ/ygflmehQHZfabRyMy8V4caAq+0izwMFugTGR1Ls5Y7y3IRW/Y/ItnKuggmyFsfKILskuiWFOvQccN2Q=; 20:e+WHh/+kgtk6Y/IA2eG02wuyWtR0tk44/s1wP8kEYst4N5JNSR3Gb6DgJbvt/h15XGBFnWXReybZpzmjEh0BleMlHptuOu7BxgO0SYfs+pRwjadkjSNdRyjbfmHM+oZT8ib5thpFC86HYFUFgPwwBCwp9eL/C8jNORiuTJQfEhDqg8eSpRLSMk7smWMWh7kyAhjkGwITij9HxWasGQqO0ViiSTccZWYMGFTTd5WBuaPFTmPO4t304W0Yhn6H71QCKUvfY7iMqkAoET/zsHPxOXGszh+cqvEVYvE3iHKabAhKygnwpr/FG3mEeaE2PeqGodQo7Bd/cZ2AwaSLDhcelakKNxjFwS1SjQOslSrkUOi2U/0V67NYVZ9zulVcYbGGTSZgzOiQIriKre8oi63vpiHvZUXnZAG9HbZ2XO2GFDPoIKbSneeDAeVA65bycCkULedieli/yphCSph3yMxMi8N/M1zgzrCt3Xeox1WDRNRPJlENDTFC8nyOSDDEMSs1 X-Exchange-Antispam-Report-Test: UriScan:(142945433499172)(788757137089)(192813158149592)(21532816269658); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3231021)(100000703101)(100105400095)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR02MB3390; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR02MB3390; X-Microsoft-Exchange-Diagnostics: 1; MWH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u+pcRDq0HjZj0xxhJaR2BXamO9K6EbuyA9WwHe3k3ou44VAz4UbSwduhg9dvUSWcd9cGfh6N2J8=; 5:J+cX/6Ou8b9LANC5fhSBlda8YmqBBvXGCCNzF5mCoGzmh0ASGNOJ6dF96//3Q5bW6TyJue+GyB8TMqRkpRjNFD+zFiT1NeAEp5aYQ0+KYrCBjKKPBQdTQ584hf/0VLV6giOx3DqaXgYMZ6rKEIz7IrRaXGnVmk3PxLrnbi7dUfQ=; 24:RCYWxW8f6cYiZcoJboRWDLJxETgGRxgM2sq+WmkXycFCYR6bhuI3KHR5bUBLNuD1l6ZaWR3Pq0R+hWoxdRXtqIXzno5Oep6l0IjbiC+V8Rw=; 7:S26A5qo7f/3Kj0TNM7J9Weu5p6yIroWYdHSzqN8vvhvfR6La2AOJz5tES8IiNxD9RooMXzaKkCKgwkgJUSGqmmaNeWeMT3UJPNcy50VaqfjsxQeqj/Z9c8uSe1MzAICp9NaRE5VJarOVStSe6/fcSK/ywcI/N2RFEBmbnkrYs3UIpgRczTAmjnzezRizpOks44ajVj7p9ZlEu6uKjoU8iYS1e2I0KgZJBEnCdzyc2mfj4nXtxebqmzVLc96yeOwG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2017 23:02:28.7891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b9fcc7b-e6c7-4e1e-fca5-08d526fcc92d 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: MWHPR02MB3390 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.37.48 Subject: [Qemu-devel] [PATCH v4 31/45] hw/ppc: Replace fprintf(stderr, "*\n" with error_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, qemu-ppc@nongnu.org, armbru@redhat.com, alistair.francis@xilinx.com 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_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_= report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_re= port("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report= ("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("= \1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1= "\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\= 2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2)= ;|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|= Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig= }' \ {} + find ./* -type f -exec sed -i \ 'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}'= \ {} + find ./* -type f -exec sed -i \ 'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + Some lines where then manually tweaked to pass checkpatch. Signed-off-by: Alistair Francis Cc: qemu-ppc@nongnu.org Acked-by: David Gibson --- V2: - Split hw patch into individual directories hw/ppc/e500.c | 22 +++++++++++----------- hw/ppc/mac_newworld.c | 2 +- hw/ppc/mac_oldworld.c | 2 +- hw/ppc/mpc8544_guts.c | 5 +++-- hw/ppc/ppc405_boards.c | 15 ++++++--------- hw/ppc/ppc440_bamboo.c | 22 +++++++++++----------- hw/ppc/ppc4xx_pci.c | 3 ++- hw/ppc/prep.c | 4 ++-- hw/ppc/virtex_ml507.c | 4 ++-- 9 files changed, 39 insertions(+), 40 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 9178e70132..e488fb4f3a 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -333,13 +333,13 @@ static int ppce500_load_device_tree(MachineState *mac= hine, ret =3D qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-start", initrd_base); if (ret < 0) { - fprintf(stderr, "couldn't set /chosen/linux,initrd-start\n"); + error_report("couldn't set /chosen/linux,initrd-start"); } =20 ret =3D qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-end", (initrd_base + initrd_size)); if (ret < 0) { - fprintf(stderr, "couldn't set /chosen/linux,initrd-end\n"); + error_report("couldn't set /chosen/linux,initrd-end"); } =20 } @@ -353,7 +353,7 @@ static int ppce500_load_device_tree(MachineState *machi= ne, ret =3D qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", machine->kernel_cmdline); if (ret < 0) - fprintf(stderr, "couldn't set /chosen/bootargs\n"); + error_report("couldn't set /chosen/bootargs"); =20 if (kvm_enabled()) { /* Read out host's frequencies */ @@ -720,7 +720,7 @@ static DeviceState *ppce500_init_mpic_kvm(PPCE500Params= *params, =20 CPU_FOREACH(cs) { if (kvm_openpic_connect_vcpu(dev, cs)) { - fprintf(stderr, "%s: failed to connect vcpu to irqchip\n", + error_report("%s: failed to connect vcpu to irqchip", __func__); abort(); } @@ -815,7 +815,7 @@ void ppce500_init(MachineState *machine, PPCE500Params = *params) cs =3D CPU(cpu); =20 if (env->mmu_model !=3D POWERPC_MMU_BOOKE206) { - fprintf(stderr, "MMU model %i not supported by this machine.\n= ", + error_report("MMU model %i not supported by this machine.", env->mmu_model); exit(1); } @@ -961,8 +961,8 @@ void ppce500_init(MachineState *machine, PPCE500Params = *params) cur_base, ram_size - cur_base); if (kernel_size < 0) { - fprintf(stderr, "qemu: could not load kernel '%s'\n", - machine->kernel_filename); + error_report("could not load kernel '%s'", + machine->kernel_filename); exit(1); } =20 @@ -976,8 +976,8 @@ void ppce500_init(MachineState *machine, PPCE500Params = *params) ram_size - initrd_base); =20 if (initrd_size < 0) { - fprintf(stderr, "qemu: could not load initial ram disk '%s'\n", - machine->initrd_filename); + error_report("could not load initial ram disk '%s'", + machine->initrd_filename); exit(1); } =20 @@ -1018,7 +1018,7 @@ void ppce500_init(MachineState *machine, PPCE500Param= s *params) kernel_size =3D load_uimage(filename, &bios_entry, &loadaddr, NULL, NULL, NULL); if (kernel_size < 0) { - fprintf(stderr, "qemu: could not load firmware '%s'\n", filena= me); + error_report("could not load firmware '%s'", filename); exit(1); } } @@ -1031,7 +1031,7 @@ void ppce500_init(MachineState *machine, PPCE500Param= s *params) initrd_base, initrd_size, kernel_base, kernel_size); if (dt_size < 0) { - fprintf(stderr, "couldn't load device tree\n"); + error_report("couldn't load device tree"); exit(1); } assert(dt_size < DTB_MAX_SIZE); diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 3fa7c429d5..b832417a56 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -270,7 +270,7 @@ static void ppc_core99_init(MachineState *machine) } } if (ppc_boot_device =3D=3D '\0') { - fprintf(stderr, "No valid boot device for Mac99 machine\n"); + error_report("No valid boot device for Mac99 machine"); exit(1); } } diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 010ea36bf2..d1f4546613 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -218,7 +218,7 @@ static void ppc_heathrow_init(MachineState *machine) #endif } if (ppc_boot_device =3D=3D '\0') { - fprintf(stderr, "No valid boot device for G3 Beige machine\n"); + error_report("No valid boot device for G3 Beige machine"); exit(1); } } diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c index ce1254b5d4..3a2c49e3fd 100644 --- a/hw/ppc/mpc8544_guts.c +++ b/hw/ppc/mpc8544_guts.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "qemu-common.h" #include "cpu.h" #include "hw/hw.h" @@ -83,7 +84,7 @@ static uint64_t mpc8544_guts_read(void *opaque, hwaddr ad= dr, value =3D env->spr[SPR_E500_SVR]; break; default: - fprintf(stderr, "guts: Unknown register read: %x\n", (int)addr); + error_report("guts: Unknown register read: %x", (int)addr); break; } =20 @@ -102,7 +103,7 @@ static void mpc8544_guts_write(void *opaque, hwaddr add= r, } break; default: - fprintf(stderr, "guts: Unknown register write: %x =3D %x\n", + error_report("guts: Unknown register write: %x =3D %x", (int)addr, (unsigned)value); break; } diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index e92db2c66a..fae9c76174 100644 --- a/hw/ppc/ppc405_boards.c +++ b/hw/ppc/ppc405_boards.c @@ -324,8 +324,7 @@ static void ref405ep_init(MachineState *machine) kernel_size =3D load_image_targphys(kernel_filename, kernel_base, ram_size - kernel_base); if (kernel_size < 0) { - fprintf(stderr, "qemu: could not load kernel '%s'\n", - kernel_filename); + error_report("could not load kernel '%s'", kernel_filename); exit(1); } printf("Load kernel size %ld at " TARGET_FMT_lx, @@ -336,8 +335,8 @@ static void ref405ep_init(MachineState *machine) initrd_size =3D load_image_targphys(initrd_filename, initrd_ba= se, ram_size - initrd_base); if (initrd_size < 0) { - fprintf(stderr, "qemu: could not load initial ram disk '%s= '\n", - initrd_filename); + error_report("could not load initial ram disk '%s'", + initrd_filename); exit(1); } } else { @@ -607,8 +606,7 @@ static void taihu_405ep_init(MachineState *machine) kernel_size =3D load_image_targphys(kernel_filename, kernel_base, ram_size - kernel_base); if (kernel_size < 0) { - fprintf(stderr, "qemu: could not load kernel '%s'\n", - kernel_filename); + error_report("could not load kernel '%s'", kernel_filename); exit(1); } /* load initrd */ @@ -617,9 +615,8 @@ static void taihu_405ep_init(MachineState *machine) initrd_size =3D load_image_targphys(initrd_filename, initrd_ba= se, ram_size - initrd_base); if (initrd_size < 0) { - fprintf(stderr, - "qemu: could not load initial ram disk '%s'\n", - initrd_filename); + error_report("could not load initial ram disk '%s'", + initrd_filename); exit(1); } } else { diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c index 693c215108..12f92b9f2c 100644 --- a/hw/ppc/ppc440_bamboo.c +++ b/hw/ppc/ppc440_bamboo.c @@ -12,6 +12,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "qemu-common.h" #include "net/net.h" #include "hw/hw.h" @@ -80,22 +81,22 @@ static int bamboo_load_device_tree(hwaddr addr, ret =3D qemu_fdt_setprop(fdt, "/memory", "reg", mem_reg_property, sizeof(mem_reg_property)); if (ret < 0) - fprintf(stderr, "couldn't set /memory/reg\n"); + error_report("couldn't set /memory/reg"); =20 ret =3D qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-start", initrd_base); if (ret < 0) - fprintf(stderr, "couldn't set /chosen/linux,initrd-start\n"); + error_report("couldn't set /chosen/linux,initrd-start"); =20 ret =3D qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-end", (initrd_base + initrd_size)); if (ret < 0) - fprintf(stderr, "couldn't set /chosen/linux,initrd-end\n"); + error_report("couldn't set /chosen/linux,initrd-end"); =20 ret =3D qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", kernel_cmdline); if (ret < 0) - fprintf(stderr, "couldn't set /chosen/bootargs\n"); + error_report("couldn't set /chosen/bootargs"); =20 /* Copy data from the host device tree into the guest. Since the guest= can * directly access the timebase without host involvement, we must expo= se @@ -186,7 +187,7 @@ static void bamboo_init(MachineState *machine) env =3D &cpu->env; =20 if (env->mmu_model !=3D POWERPC_MMU_BOOKE) { - fprintf(stderr, "MMU model %i not supported by this machine.\n", + error_report("MMU model %i not supported by this machine.", env->mmu_model); exit(1); } @@ -220,7 +221,7 @@ static void bamboo_init(MachineState *machine) NULL); pcibus =3D (PCIBus *)qdev_get_child_bus(dev, "pci.0"); if (!pcibus) { - fprintf(stderr, "couldn't create PCI controller!\n"); + error_report("couldn't create PCI controller!"); exit(1); } =20 @@ -261,8 +262,7 @@ static void bamboo_init(MachineState *machine) } /* XXX try again as binary */ if (success < 0) { - fprintf(stderr, "qemu: could not load kernel '%s'\n", - kernel_filename); + error_report("could not load kernel '%s'", kernel_filename); exit(1); } } @@ -273,8 +273,8 @@ static void bamboo_init(MachineState *machine) ram_size - RAMDISK_ADDR); =20 if (initrd_size < 0) { - fprintf(stderr, "qemu: could not load ram disk '%s' at %x\n", - initrd_filename, RAMDISK_ADDR); + error_report("could not load ram disk '%s' at %x", + initrd_filename, RAMDISK_ADDR); exit(1); } } @@ -283,7 +283,7 @@ static void bamboo_init(MachineState *machine) if (kernel_filename) { if (bamboo_load_device_tree(FDT_ADDR, ram_size, RAMDISK_ADDR, initrd_size, kernel_cmdline) < 0) { - fprintf(stderr, "couldn't load device tree\n"); + error_report("couldn't load device tree"); exit(1); } } diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c index 4765dcecca..807e91b8fa 100644 --- a/hw/ppc/ppc4xx_pci.c +++ b/hw/ppc/ppc4xx_pci.c @@ -20,6 +20,7 @@ * 4xx SoCs, such as the 440EP. */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "hw/hw.h" #include "hw/ppc/ppc.h" #include "hw/ppc/ppc4xx.h" @@ -254,7 +255,7 @@ static void ppc4xx_pci_set_irq(void *opaque, int irq_nu= m, int level) =20 trace_ppc4xx_pci_set_irq(irq_num); if (irq_num < 0) { - fprintf(stderr, "%s: PCI irq %d\n", __func__, irq_num); + error_report("%s: PCI irq %d", __func__, irq_num); return; } qemu_set_irq(pci_irqs[irq_num], level); diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 6f8accc397..17d6d1960b 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -573,7 +573,7 @@ static void ppc_prep_init(MachineState *machine) } } if (ppc_boot_device =3D=3D '\0') { - fprintf(stderr, "No valid boot device for Mac99 machine\n"); + error_report("No valid boot device for Mac99 machine"); exit(1); } } @@ -594,7 +594,7 @@ static void ppc_prep_init(MachineState *machine) qdev_init_nofail(dev); pci_bus =3D (PCIBus *)qdev_get_child_bus(dev, "pci.0"); if (pci_bus =3D=3D NULL) { - fprintf(stderr, "Couldn't create PCI host controller.\n"); + error_report("Couldn't create PCI host controller."); exit(1); } sysctrl->contiguous_map_irq =3D qdev_get_gpio_in(dev, 0); diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c index 5ac4f76613..c1cac864c6 100644 --- a/hw/ppc/virtex_ml507.c +++ b/hw/ppc/virtex_ml507.c @@ -187,7 +187,7 @@ static int xilinx_load_device_tree(hwaddr addr, =20 r =3D qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", kernel_cmdli= ne); if (r < 0) - fprintf(stderr, "couldn't set /chosen/bootargs\n"); + error_report("couldn't set /chosen/bootargs"); cpu_physical_memory_write(addr, fdt, fdt_size); return fdt_size; } @@ -215,7 +215,7 @@ static void virtex_init(MachineState *machine) env =3D &cpu->env; =20 if (env->mmu_model !=3D POWERPC_MMU_BOOKE) { - fprintf(stderr, "MMU model %i not supported by this machine.\n", + error_report("MMU model %i not supported by this machine.", env->mmu_model); exit(1); } --=20 2.14.1