From nobody Fri Dec 19 20:17:37 2025 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508430837499709.9896653235259; Thu, 19 Oct 2017 09:33:57 -0700 (PDT) Received: from localhost ([::1]:50129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5DlQ-0007D8-7C for importer@patchew.org; Thu, 19 Oct 2017 12:33:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5DZp-0005bL-S0 for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:21:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5DZn-00020M-F6 for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:21:45 -0400 Received: from mail-cys01nam02on0045.outbound.protection.outlook.com ([104.47.37.45]:3204 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 1e5DZh-0001xp-1k; Thu, 19 Oct 2017 12:21:37 -0400 Received: from MWHPR0201CA0009.namprd02.prod.outlook.com (10.167.160.150) by BY2PR02MB1329.namprd02.prod.outlook.com (10.162.79.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 19 Oct 2017 16:21:33 +0000 Received: from CY1NAM02FT014.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::203) by MWHPR0201CA0009.outlook.office365.com (2603:10b6:301:74::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.156.4 via Frontend Transport; Thu, 19 Oct 2017 16:21:33 +0000 Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT014.mail.protection.outlook.com (10.152.75.142) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Thu, 19 Oct 2017 16:21:32 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:38623 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1e5DZb-0007xH-R0; Thu, 19 Oct 2017 09:21:31 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1e5DZb-00037b-MN; Thu, 19 Oct 2017 09:21:31 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v9JGLQa0006837; Thu, 19 Oct 2017 09:21:27 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1e5DZW-000375-TI; Thu, 19 Oct 2017 09:21:26 -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=tWnliW+hQyaZG8DEpW7dQMJoiOvz4pS1/RDcl7XhqB0=; b=WV4XxHSGdBzbyiYKpr78WAOMpkJgO1ISKSfpGu0ef+PwZae5pbl60nApl7eSp5YF+kuCA663lXYyzM1MhYtisNBXsWj7YNQ2X497kX4FIsF5zgUkdQEiNpezUc5+xgkhMUjxk68JZooZOyurhkdQXszpo3AwyX4ffEt3BAX8VHo= Authentication-Results: spf=pass (sender IP is 149.199.60.100) 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: 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: Thu, 19 Oct 2017 09:17:34 -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-23404.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)(39860400002)(376002)(346002)(2980300002)(438002)(189002)(199003)(81156014)(356003)(33646002)(4326008)(106002)(81166006)(50986999)(2906002)(8936002)(16586007)(47776003)(6916009)(5003940100001)(8676002)(2950100002)(106466001)(189998001)(2351001)(76176999)(5660300001)(39060400002)(6666003)(50226002)(305945005)(63266004)(9786002)(54906003)(48376002)(478600001)(36756003)(118296001)(50466002)(77096006)(316002)(36386004)(107986001)(21314002)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB1329; 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; CY1NAM02FT014; 1:RM2/OXmKBZQZ10TwZfJ1HsYMkslraO+nO6LuXuVLfowTrcJUQF90T/jfriPP3Bvv4sHU11sAqpBJsexxIu1QX97wFdAKcVPN8hCmVbjqBg2B5IJIjmwFF2tvvTovjmGF MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 43c54b50-984d-46d8-0844-08d5170d75f8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254168)(8251501002)(4534016)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199)(201703131423091); SRVR:BY2PR02MB1329; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1329; 3:RWoAtjVi8TtoUseTxI2Jqjf+Vc/cv/uMkAFFI/VvZfCysqsmOJB6FupqabV02PSrewERJ/FcONBQzUF2AQo6l/HVwxVXxNw5Eye09xRYnSmbnNsIhC2VFtBxh7JT1ECbCJEKomvPhvQ8JgeQ+BCTwOYG6JYto79q29Nf38nFiqGASomvqB/0eFQSn3lvNrLL2etjPdXM6Q9hr3k3aWSJ1YrQcq3AF9rQre7AOBJW7L2W2rfc//0nPAWzUMXEh4/c8Moe77lWQKCW/t5G94OSiJYy6yY2VXJs9aiTw5fV5Ddb/up9K8+GG3nEPTe5NgSJ2oFXjKxiQROR3q8mVDXftlkFAr0hNhE7Y2PnXwHo3Qo=; 25:HPEdSIlxj6mABzYtL8vV2+1fPyCmqbyq7x5ZK60ojbPWxrnqk0MwjGU/OIQuraJpKL5hK+NXze0Yf4MGqjtsTe/LUnocYPDUMwLmATpvHAhBa1+DYPOpXb688kv6ikcDufgc/rRZS8w1oXNQ9agwwHAQ7J+iR4XZsCU+A16olexLIgm5OJwQuLQqiAxokVxGgbC+C7xDxbejt5mvCJ9DxybIf/umxJbaug0cQvnRixj+aI1EhUrROLUDu0Bt1XSXKMoXeSAvUnsCrG+YGi+TyAkzN6BQ4IgXZ2CfJ2t7OeH7yjSFTz03rq7KDi2+zW6idI52zBLi1ss1+jpCBCg4HA== X-MS-TrafficTypeDiagnostic: BY2PR02MB1329: X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1329; 31:p2FbsY19dTxYb5KpjEg8G+FIJpgnN8wAVClcrma896j5SuSr+pZnI5i6klzeg9nO4v8vc2rawa2cOfdLrG0ZM1DUXIsRalVyjtqDYVG47FeDuZHfkqT82q12R2OhCBd9W+Lg9dAplK+M4GjOcvDLTtULR4nnsB1BQGMTPWF0rNyGXLvRZkcd87lA4NBVlALsvBaDtHN6PgakZOMyMDM/x+xX9SPKA2zSGXbV+QiLTdM=; 20:3RC+eri0FUtWST7dtjrReV5d24jW0kcSOZXiLPucyiFwJd773sV0pGEhSRVUoQ0tsc8rImoeAEkNprc8oNZgXRx0jVqPfISrcHFSRHbsWmkfQqwabZTapZiRzvd2jZXe02oNc87Md9QA/UXxWmaTouC2sX9cxZpQhloY5UwGSUP+TwpXVG+pBjcAJrcXt0ALqa4U9Searx8cOVFzYJ8StZCpexoc9XTLth8A+RiAxYeY3U0qaOUOEKE4bZAtMcJbxWLvv76xcjdkplwUeQZgziXDx5egNlDvW8Pn0Z6hx2nn1TWEJVsjKeTxBBci8heUgUPwq0tDgKG4sdb7A0m8LMwIkJUKws2Aia8TgOsSAoaVSvBeXkCEI798LRe3iY2xmt30lAMJ3haN9pa70BgX5Np3eSsTaEJqZlOc7Tp8gdpWpXDvWwBBAJ+KTforL0p8zyCaTAqWJ1IXqjmrYGAaekJ/XxRZXgvJSZCZ6ZpHacVt7Rec1vC2bkbgR+fqGQFK 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)(100000703101)(100105400095)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR02MB1329; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR02MB1329; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1329; 4:8O1FVTc/35Olpw8OV6Kk5uHXyP5iXg3asqz8N2ShH37uqkiy8SzQyYgQJAWZTcDhGmLKxnS89ffUyh70evKULRIyH0izJia6djHpFk+cnCA+YnztIGrGa0UGElwRMyjXiAf1FP9DW8p9RrumGVy+uendAAccD9bgkK6reGvmF13yfHqLNXiNeK6qgGWaKS+zwuvo0LHiCd6TIOGYuxqSnwbOZkAkw8DyLFct8QMoJNHa7yXOhN1fdpJ8oFuNOcA8NIVL7oeG/J3a4KeAaQB/2LlSSWqKTBMuaW/mVvqKWBkHS7PPL3EORWzVB3Y+cKY4pnT0uuCttja+aXOr5Bzlz+/E2XSw6Nf01UhrFMFB88uIBosMEIiB9lSjud2anqlL7PRyiqwfG1l5Uu2vh1/v9w== X-Forefront-PRVS: 0465429B7F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR02MB1329; 23:8xoVkpq+jLxPQt9863jiG3+LoHtM4P4CBA6t0oyN8?= =?us-ascii?Q?KMiuTSVbcWbRUgYSjx9Ry0ugmq/ue9j/vHgo0pOj4qttTemlZnZZi6xLGtAo?= =?us-ascii?Q?ecsNSO0WyIhfjpWyqtSkguHu3Q7LEve+8I832OMPvWx7CTlHCTGOipTQGCnP?= =?us-ascii?Q?ZdUi2RqAb0lsyWJg2zD3p5/ogC/TtqCoqgYO5Mi6pDG7+OwHH37iGPUHkKLI?= =?us-ascii?Q?SKTvVqOVB1GKret1DyWel0yVvAcunCUZ6Hao3ghrSavvrpE3rtWiXKee0wTZ?= =?us-ascii?Q?rDo/FhSIrk4VHhSbvTA3wy2Zaak4hG6sHyFizsZYAiqdl0FUb/aoL1XeTvJ4?= =?us-ascii?Q?dpvwA7L/l0KVpBAR4JMoTlgxaksw1DPSkGMxlRerKGgyKYg+J0w3LOnnaK7v?= =?us-ascii?Q?I+m9gG8E+TBg49t0ZKb+CN0lu8TIGQazTUwTMMwAg5m510Olty/0zKU8fM7f?= =?us-ascii?Q?KqISWlbIOH7JT/6KUuJqTbyzWS2spFng5ftgLVljrQgBSZwQRE/KKD686R17?= =?us-ascii?Q?JpNwhxpyyFlJCZNz8GL3lGPPp1a9Lx5WSN0dhppXmHcTayUs/8Aih4tpNNhk?= =?us-ascii?Q?ZLyPT0j1dmuzXFjE4/5G4kpFmsg1VEVJz3pg+VEdrJ4UX80rPVHrUKJu8X7/?= =?us-ascii?Q?C3QHAvlvXtdHmGrPtZoafyqFCa/eWl7Bb3DkiTtJRkhJimPzbS1L6XE0SGdL?= =?us-ascii?Q?QB6NEi0j8MKbxPjy0DanRJck6iS0AVjcYNJ9tTHFIJqDQVo6w98XHHXW//j0?= =?us-ascii?Q?QqfeCBbylCMBUop9fLNVwKqPJRKZJULxd5sbTkSuIlofoqnKpL8xw2Yeny7W?= =?us-ascii?Q?abmUveqZB7DyWAVlZOvY+ea8D+SBDp8w8PTIqCMwWcAxjJckeyq8bqRN3QNJ?= =?us-ascii?Q?AcVV8d1/Y4p5461yaanI+Hb1QMm/DwyLRc1zIzrjX3w8N0mJzGr7SlXdwmyQ?= =?us-ascii?Q?Qv/7AOobv1ux+Y+XqhSv5WQUmnozq2XxXZkJlU5203SQjus0AAFqOKTSrBnB?= =?us-ascii?Q?LHXyYLBajhpbm4tXuxhnFwgq09JXQlbnJ/C2D292Yid0phaha3RvTE6mftNh?= =?us-ascii?Q?sYZsIUPVmeabLSnpUiucCiEz96IsLiudoHP3kSvj26NzviBvg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1329; 6:IQYhFamev8B8TEADj18HEr2JicWdK8pPO3a8/tXXZHGWc6mfFazhXH7lJF/TZZ9vq2KuUdQ5RDornYd7VlsNaJEm9zTeTp5DJRQ9mzyn3jEnGQB8k9aokmF+x2aW80McxHMBZaF1dwgZ6f81u5253tCc/6glALBfaJNHJ6uKBx+hCHnkHsY5Pl1G4oego+NpbWeZ+YGDBD90J8vPNcx0006iIa8fPOgKDXxpjNi/X/aWBM+JbmEJc890+zwIu38dalvxSdZbeE7CfOms/8Pxrbp/0Xgtf0fKX/FOxApufKroQGDHRTJpqmHhD5snC2Fa6HYm+jvZM09zwaX47U26zg==; 5:rB8KKiKp55gR6J4y4s5U0+7I83GkXKOUezRGpG06MlZpcHFjJ/XWYrIewnRX+BWUYW3EyWvYhdN2dmwbqaMPZ3BN5PxrbpOl9ih5AUk55iRK7qkqtgi54IOXZAiOsq6G1waCjajvMoPVmF17HvlHNA==; 24:5bkn4+sRVs/BygGD2Wp10XuZ3J3hLjBSpfqAIhYFVD1CNTKmdZUs2AKpeAQ/BbKcgd55oBXgMjY25DpZhwGkj8UFNWjyDmGHeJjwPVWfX5U=; 7:eyVKG9A0aTnqCdnoVzPzrfsmIc/luhrKwbW/15Ra+wF/STNqzz5Whb4EunmuOvIqakp78N4IKxhgnwjOyGuVNXqkN1oiPaRHP44q34IimK9sDFydd/MSGK78/HmPnTkVVRQulLJqVJa5NPZaw+yetvlWfOTgEu7nspyk4yUrA/iHHOu1GyI714pt7EXIbmtfz8Ggfe5JhHO5YYwjVM32Tn3wpKahdnhT8cyzfi4QGtw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2017 16:21:32.0246 (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: BY2PR02MB1329 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.37.45 Subject: [Qemu-devel] [PATCH v3 31/46] 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_0 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.11.0