get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/812577/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 812577,
    "url": "http://patchwork.ozlabs.org/api/patches/812577/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/5def63849ca8f551630c6f2b45bcb1c482f765a6.1505158760.git.alistair.francis@xilinx.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<5def63849ca8f551630c6f2b45bcb1c482f765a6.1505158760.git.alistair.francis@xilinx.com>",
    "list_archive_url": null,
    "date": "2017-09-11T19:52:53",
    "name": "[v4,4/8] Convert multi-line fprintf() to warn_report()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b8a395c93e2dbc19dc9fa6759eb4c4472453b62f",
    "submitter": {
        "id": 47878,
        "url": "http://patchwork.ozlabs.org/api/people/47878/?format=api",
        "name": "Alistair Francis",
        "email": "alistair.francis@xilinx.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/5def63849ca8f551630c6f2b45bcb1c482f765a6.1505158760.git.alistair.francis@xilinx.com/mbox/",
    "series": [
        {
            "id": 2556,
            "url": "http://patchwork.ozlabs.org/api/series/2556/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2556",
            "date": "2017-09-11T19:52:38",
            "name": "More warning reporting fixed",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/2556/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/812577/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/812577/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=xilinx.onmicrosoft.com\n\theader.i=@xilinx.onmicrosoft.com header.b=\"LNmKfOnb\"; \n\tdkim-atps=neutral",
            "spf=pass (sender IP is 149.199.60.83)\n\tsmtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed)\n\theader.d=none;redhat.com; dmarc=bestguesspass action=none\n\theader.from=xilinx.com;"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrf3g35hjz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 06:02:39 +1000 (AEST)",
            "from localhost ([::1]:60256 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drUuj-0002tC-K3\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 16:02:37 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:39966)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <alistai@xilinx.com>) id 1drUp6-0006Ck-KB\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 15:56:51 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <alistai@xilinx.com>) id 1drUp3-0002HG-2d\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 15:56:48 -0400",
            "from mail-by2nam01on0040.outbound.protection.outlook.com\n\t([104.47.34.40]:51648\n\thelo=NAM01-BY2-obe.outbound.protection.outlook.com)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <alistai@xilinx.com>) id 1drUp2-0002Gp-ML\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 15:56:45 -0400",
            "from MWHPR0201CA0010.namprd02.prod.outlook.com (10.167.160.151) by\n\tCY1PR02MB1135.namprd02.prod.outlook.com (10.163.15.149) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.20.35.12; Mon, 11 Sep 2017 19:56:38 +0000",
            "from BL2NAM02FT019.eop-nam02.prod.protection.outlook.com\n\t(2a01:111:f400:7e46::205) by MWHPR0201CA0010.outlook.office365.com\n\t(2603:10b6:301:74::23) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via\n\tFrontend Transport; Mon, 11 Sep 2017 19:56:38 +0000",
            "from xsj-pvapsmtpgw01 (149.199.60.83) by\n\tBL2NAM02FT019.mail.protection.outlook.com (10.152.77.166) with\n\tMicrosoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.13.11\n\tvia Frontend Transport; Mon, 11 Sep 2017 19:56:37 +0000",
            "from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01)\n\tby xsj-pvapsmtpgw01 with esmtp (Exim 4.63)\n\t(envelope-from <alistair.francis@xilinx.com>)\n\tid 1drUov-0000Il-5C; Mon, 11 Sep 2017 12:56:37 -0700",
            "from [127.0.0.1] (helo=localhost)\n\tby xsj-pvapsmtp01 with smtp (Exim 4.63)\n\t(envelope-from <alistair.francis@xilinx.com>)\n\tid 1drUov-00004r-0v; Mon, 11 Sep 2017 12:56:37 -0700",
            "from xsj-pvapsmtp01 (xsj-pvapsmtp01.xilinx.com [149.199.38.66])\n\tby xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id\n\tv8BJuRV8029758; Mon, 11 Sep 2017 12:56:27 -0700",
            "from [172.19.2.220] (helo=localhost.localdomain)\n\tby xsj-pvapsmtp01 with esmtp (Exim 4.63)\n\t(envelope-from <alistair.francis@xilinx.com>)\n\tid 1drUol-0008Vq-Kb; Mon, 11 Sep 2017 12:56:27 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=xilinx.onmicrosoft.com; s=selector1-xilinx-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=UdmJvmCRJsQC61O6AkFVJ0ef0s7va/fL1ihw9KaUpBA=;\n\tb=LNmKfOnbqj9b5BlU+MY2kTaFK30bPeY4UVNF+jhvdP2WG+JV+N38Ygli57OCxnjj2BpA3wFvyuXoV/EZjRGPKjAvdTipTqVeUq2xIbInNH5NIN3/fl8cKx79QAJjv6FwXlllJmF8hc3YPNi6DALfITJKhj89z4diQ9AlgW8zSBI=",
        "Received-SPF": "Pass (protection.outlook.com: domain of xilinx.com designates\n\t149.199.60.83 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=149.199.60.83; helo=xsj-pvapsmtpgw01;",
        "From": "Alistair Francis <alistair.francis@xilinx.com>",
        "To": "<qemu-devel@nongnu.org>",
        "Date": "Mon, 11 Sep 2017 12:52:53 -0700",
        "Message-ID": "<5def63849ca8f551630c6f2b45bcb1c482f765a6.1505158760.git.alistair.francis@xilinx.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<cover.1505158760.git.alistair.francis@xilinx.com>",
        "References": "<cover.1505158760.git.alistair.francis@xilinx.com>",
        "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.83; IPV:NLI; CTRY:US; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(8666007)(47776003)(4326008)(39060400002)(305945005)(110136004)(54906002)(33646002)(2351001)(106466001)(63266004)(76176999)(2950100002)(356003)(6916009)(77096006)(50986999)(5660300001)(7416002)(6666003)(81156014)(81166006)(2906002)(478600001)(50466002)(9786002)(8936002)(48376002)(8676002)(50226002)(5003940100001)(189998001)(118296001)(575784001)(36756003)(36386004)(107986001);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR02MB1135; H:xsj-pvapsmtpgw01;\n\tFPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:en;",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; BL2NAM02FT019;\n\t1:tq6Is8817zP7+rgF5whZQaDsRyVhk+s+mJ0MXYgoaIVZukXkrhJB/SfAd6eMryHtTfmH9btbC4+M6Wc+hJ5Ba9klBD6HfZ3peTIJFDgnkplMxpvmrFNtpwr2a5ght9ts",
            "1; CY1PR02MB1135;\n\t3:4xkak5cNtDs4mZxYwAlSp0Ug7X8hck1kKrAVkSSH0XFEh7qkyi4R2pQfdRZ8oGCwWWyNinF8UzyDk8Swmp+sHrm/30yhGxP6TfiCveRcWOHDxpIBVinpzSdMFQTRE10adr60bRsKPH7FxhtbZc02oAhyiBYhV/g9owpnrqZdcWeMbm8EIUI7g+WnuSCSOFETRLXIUo0ENOiwfL48EB24hol6xC4UmB8WLbsHoGZgEq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BdTUkf9BRHP9NsmGIMZfUHFVqHBOnLibNK6iRkblrQi05XpsDmOWFrmf89dBUlYUGh1GMXV0XSOen1Oo0mieFZlP7kFeBr8+UJEiqgpFavbam1nZ/H6njyJ7ZqaONx+J3O323Q4bwP1O4Vg==;\n\t24:RfDWvV7li0pI9E8wxU7AffvHEDy6gGp0wo5Fmh/6cjNxh/6W9hvwP6hiES3Jp/VXJhdB1H42xJLwju+6aJdj4BjM+MOKNNFE/o9Z6QbjZow=;\n\t7:tuARisM/hSqTwhIEOPA67K017N2b6t2zj471Dv1eJFNfVI/fSGi4ZpQJ1ecUpFZ8bJxLZSxefGztj9Upxosve8L7GwOB6SMkYXwjlH+olQu52DcW5DRALUdawviwt1epql5bYR7RNm6O56No1O+sLDIOtioPChNsWJ6V5EBRYBynXclBpcSxf8kZVQ2lefTqe4hWaWjYOeQUuNSI/kDDhhTHN1d+L7tG43YeN4TGink="
        ],
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "0224766d-08fc-424b-8c26-08d4f94f36c3",
        "X-Microsoft-Antispam": "UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:CY1PR02MB1135; ",
        "X-MS-TrafficTypeDiagnostic": "CY1PR02MB1135:",
        "X-Exchange-Antispam-Report-Test": "UriScan:(190383065149520)(192813158149592)(70601490899591)(104084551191319)(17755550239193);",
        "X-Microsoft-Antispam-PRVS": "<CY1PR02MB113552C1B32874615D7D3018DC680@CY1PR02MB1135.namprd02.prod.outlook.com>",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93004095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123558100)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:CY1PR02MB1135; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:CY1PR02MB1135; ",
        "X-Forefront-PRVS": "04270EF89C",
        "SpamDiagnosticOutput": "1:99",
        "SpamDiagnosticMetadata": "NSPM",
        "X-OriginatorOrg": "xilinx.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "11 Sep 2017 19:56:37.8068\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-Id": "657af505-d5df-48d0-8300-c31994686c5c",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=657af505-d5df-48d0-8300-c31994686c5c; \n\tIp=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01]",
        "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.34.40",
        "Subject": "[Qemu-devel] [PATCH v4 4/8] Convert multi-line fprintf() to\n\twarn_report()",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "Kevin Wolf <kwolf@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, \n\tStefano Stabellini <sstabellini@kernel.org>,\n\tEduardo Habkost <ehabkost@redhat.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>,\n\tJason Wang <jasowang@redhat.com>, Alexander Graf <agraf@suse.de>,\n\tCornelia Huck <cohuck@redhat.com>, armbru@redhat.com,\n\tMax Reitz <mreitz@redhat.com>, Yongbok Kim <yongbok.kim@imgtec.com>, \n\tIgor Mammedov <imammedo@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>,\n\tDavid Gibson <david@gibson.dropbear.id.au>, pbonzini@redhat.com,\n\tAnthony Perard <anthony.perard@citrix.com>, alistair23@gmail.com,\n\talistair.francis@xilinx.com,\n\tChristian Borntraeger <borntraeger@de.ibm.com>,\n\tAurelien Jarno <aurelien@aurel32.net>,\n\tRichard Henderson <rth@twiddle.net>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "Convert all the multi-line uses of fprintf(stderr, \"warning:\"...\"\\n\"...\nto use warn_report() instead. This helps standardise on a single\nmethod of printing warnings to the user.\n\nAll of the warnings were changed using these commands:\n  find ./* -type f -exec sed -i \\\n    'N; {s|fprintf(.*\".*warning[,:] \\(.*\\)\\\\n\"\\(.*\\));|warn_report(\"\\1\"\\2);|Ig}' \\\n    {} +\n  find ./* -type f -exec sed -i \\\n    'N;N; {s|fprintf(.*\".*warning[,:] \\(.*\\)\\\\n\"\\(.*\\));|warn_report(\"\\1\"\\2);|Ig}' \\\n    {} +\n  find ./* -type f -exec sed -i \\\n    'N;N;N; {s|fprintf(.*\".*warning[,:] \\(.*\\)\\\\n\"\\(.*\\));|warn_report(\"\\1\"\\2);|Ig}' \\\n    {} +\n  find ./* -type f -exec sed -i \\\n    'N;N;N;N {s|fprintf(.*\".*warning[,:] \\(.*\\)\\\\n\"\\(.*\\));|warn_report(\"\\1\"\\2);|Ig}' \\\n    {} +\n  find ./* -type f -exec sed -i \\\n    'N;N;N;N;N {s|fprintf(.*\".*warning[,:] \\(.*\\)\\\\n\"\\(.*\\));|warn_report(\"\\1\"\\2);|Ig}' \\\n    {} +\n  find ./* -type f -exec sed -i \\\n    'N;N;N;N;N;N {s|fprintf(.*\".*warning[,:] \\(.*\\)\\\\n\"\\(.*\\));|warn_report(\"\\1\"\\2);|Ig}' \\\n    {} +\n  find ./* -type f -exec sed -i \\\n    'N;N;N;N;N;N;N; {s|fprintf(.*\".*warning[,:] \\(.*\\)\\\\n\"\\(.*\\));|warn_report(\"\\1\"\\2);|Ig}' \\\n    {} +\n\nIndentation fixed up manually afterwards.\n\nSome of the lines were manually edited to reduce the line length to below\n80 charecters. Some of the lines with newlines in the middle of the\nstring were also manually edit to avoid checkpatch errrors.\n\nThe #include lines were manually updated to allow the code to compile.\n\nSeveral of the warning messages can be improved after this patch, to\nkeep this patch mechanical this has been moved into a later patch.\n\nSigned-off-by: Alistair Francis <alistair.francis@xilinx.com>\nCc: Paolo Bonzini <pbonzini@redhat.com>\nCc: Kevin Wolf <kwolf@redhat.com>\nCc: Max Reitz <mreitz@redhat.com>\nCc: \"Michael S. Tsirkin\" <mst@redhat.com>\nCc: Igor Mammedov <imammedo@redhat.com>\nCc: Peter Maydell <peter.maydell@linaro.org>\nCc: Stefano Stabellini <sstabellini@kernel.org>\nCc: Anthony Perard <anthony.perard@citrix.com>\nCc: Richard Henderson <rth@twiddle.net>\nCc: Eduardo Habkost <ehabkost@redhat.com>\nCc: Aurelien Jarno <aurelien@aurel32.net>\nCc: Yongbok Kim <yongbok.kim@imgtec.com>\nCc: Cornelia Huck <cohuck@redhat.com>\nCc: Christian Borntraeger <borntraeger@de.ibm.com>\nCc: Alexander Graf <agraf@suse.de>\nCc: Jason Wang <jasowang@redhat.com>\nCc: David Gibson <david@gibson.dropbear.id.au>\nCc: Gerd Hoffmann <kraxel@redhat.com>\nAcked-by: Cornelia Huck <cohuck@redhat.com>\nReviewed-by: Markus Armbruster <armbru@redhat.com>\n---\nI couldn't figure out any nice way (it is possible with some more logic\ninside the sed apparently) to do this is one command, so I had to use\nall of the commands above.\n\n accel/kvm/kvm-all.c         |  7 +++----\n block/vvfat.c               |  4 ++--\n hw/acpi/core.c              |  7 +++----\n hw/arm/vexpress.c           |  4 ++--\n hw/i386/xen/xen-mapcache.c  |  5 +++--\n hw/mips/mips_malta.c        |  4 ++--\n hw/mips/mips_r4k.c          |  6 +++---\n hw/s390x/s390-virtio.c      | 16 ++++++++--------\n net/hub.c                   |  9 ++++-----\n net/net.c                   | 14 +++++++-------\n target/i386/cpu.c           | 12 ++++++------\n target/i386/hax-mem.c       |  6 +++---\n target/ppc/translate_init.c | 18 +++++++++---------\n ui/keymaps.c                |  9 +++++----\n util/main-loop.c            |  6 +++---\n 15 files changed, 63 insertions(+), 64 deletions(-)",
    "diff": "diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c\nindex f85553a851..c9a9b75fa1 100644\n--- a/accel/kvm/kvm-all.c\n+++ b/accel/kvm/kvm-all.c\n@@ -1629,10 +1629,9 @@ static int kvm_init(MachineState *ms)\n \n     while (nc->name) {\n         if (nc->num > soft_vcpus_limit) {\n-            fprintf(stderr,\n-                    \"Warning: Number of %s cpus requested (%d) exceeds \"\n-                    \"the recommended cpus supported by KVM (%d)\\n\",\n-                    nc->name, nc->num, soft_vcpus_limit);\n+            warn_report(\"Number of %s cpus requested (%d) exceeds \"\n+                        \"the recommended cpus supported by KVM (%d)\",\n+                        nc->name, nc->num, soft_vcpus_limit);\n \n             if (nc->num > hard_vcpus_limit) {\n                 fprintf(stderr, \"Number of %s cpus requested (%d) exceeds \"\ndiff --git a/block/vvfat.c b/block/vvfat.c\nindex efad5750ba..6659a4a96a 100644\n--- a/block/vvfat.c\n+++ b/block/vvfat.c\n@@ -1227,8 +1227,8 @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags,\n \n     switch (s->fat_type) {\n     case 32:\n-            fprintf(stderr, \"Big fat greek warning: FAT32 has not been tested. \"\n-                \"You are welcome to do so!\\n\");\n+        warn_report(\"FAT32 has not been tested. \"\n+                    \"You are welcome to do so!\");\n         break;\n     case 16:\n     case 12:\ndiff --git a/hw/acpi/core.c b/hw/acpi/core.c\nindex 2a1b79c838..cd0a1d357b 100644\n--- a/hw/acpi/core.c\n+++ b/hw/acpi/core.c\n@@ -184,10 +184,9 @@ static void acpi_table_install(const char unsigned *blob, size_t bloblen,\n     }\n \n     if (has_header && le32_to_cpu(ext_hdr->length) != acpi_payload_size) {\n-        fprintf(stderr,\n-                \"warning: ACPI table has wrong length, header says \"\n-                \"%\" PRIu32 \", actual size %zu bytes\\n\",\n-                le32_to_cpu(ext_hdr->length), acpi_payload_size);\n+        warn_report(\"ACPI table has wrong length, header says \"\n+                    \"%\" PRIu32 \", actual size %zu bytes\",\n+                    le32_to_cpu(ext_hdr->length), acpi_payload_size);\n     }\n     ext_hdr->length = cpu_to_le32(acpi_payload_size);\n \ndiff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c\nindex e3acab6adf..f72ee6658b 100644\n--- a/hw/arm/vexpress.c\n+++ b/hw/arm/vexpress.c\n@@ -493,8 +493,8 @@ static void vexpress_modify_dtb(const struct arm_boot_info *info, void *fdt)\n         /* Not fatal, we just won't provide virtio. This will\n          * happen with older device tree blobs.\n          */\n-        fprintf(stderr, \"QEMU: warning: couldn't find interrupt controller in \"\n-                \"dtb; will not include virtio-mmio devices in the dtb.\\n\");\n+        warn_report(\"couldn't find interrupt controller in \"\n+                    \"dtb; will not include virtio-mmio devices in the dtb.\");\n     } else {\n         int i;\n         const hwaddr *map = daughterboard->motherboard_map;\ndiff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c\nindex 369c3df8a0..91a4fd6984 100644\n--- a/hw/i386/xen/xen-mapcache.c\n+++ b/hw/i386/xen/xen-mapcache.c\n@@ -9,6 +9,7 @@\n  */\n \n #include \"qemu/osdep.h\"\n+#include \"qemu/error-report.h\"\n \n #include <sys/resource.h>\n \n@@ -125,8 +126,8 @@ void xen_map_cache_init(phys_offset_to_gaddr_t f, void *opaque)\n         rlimit_as.rlim_cur = rlimit_as.rlim_max;\n \n         if (rlimit_as.rlim_max != RLIM_INFINITY) {\n-            fprintf(stderr, \"Warning: QEMU's maximum size of virtual\"\n-                    \" memory is not infinity.\\n\");\n+            warn_report(\"QEMU's maximum size of virtual\"\n+                        \" memory is not infinity.\");\n         }\n         if (rlimit_as.rlim_max < MCACHE_MAX_SIZE + NON_MCACHE_MEMORY_SIZE) {\n             mapcache->max_mcache_size = rlimit_as.rlim_max -\ndiff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c\nindex af678f5784..233e2ee802 100644\n--- a/hw/mips/mips_malta.c\n+++ b/hw/mips/mips_malta.c\n@@ -216,8 +216,8 @@ static void generate_eeprom_spd(uint8_t *eeprom, ram_addr_t ram_size)\n     }\n \n     if (ram_size) {\n-        fprintf(stderr, \"Warning: SPD cannot represent final %dMB\"\n-                \" of SDRAM\\n\", (int)ram_size);\n+        warn_report(\"SPD cannot represent final %dMB\"\n+                    \" of SDRAM\", (int)ram_size);\n     }\n \n     /* fill in SPD memory information */\ndiff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c\nindex 2f5ced7409..6ffb88fd70 100644\n--- a/hw/mips/mips_r4k.c\n+++ b/hw/mips/mips_r4k.c\n@@ -253,9 +253,9 @@ void mips_r4k_init(MachineState *machine)\n             fprintf(stderr, \"qemu: Error registering flash memory.\\n\");\n \t}\n     } else if (!qtest_enabled()) {\n-\t/* not fatal */\n-        fprintf(stderr, \"qemu: Warning, could not load MIPS bios '%s'\\n\",\n-\t\tbios_name);\n+        /* not fatal */\n+        warn_report(\"could not load MIPS bios '%s'\",\n+                    bios_name);\n     }\n     g_free(filename);\n \ndiff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c\nindex da3f49e80e..25781f04d8 100644\n--- a/hw/s390x/s390-virtio.c\n+++ b/hw/s390x/s390-virtio.c\n@@ -141,9 +141,9 @@ void gtod_save(QEMUFile *f, void *opaque)\n \n     r = s390_get_clock(&tod_high, &tod_low);\n     if (r) {\n-        fprintf(stderr, \"WARNING: Unable to get guest clock for migration. \"\n-                        \"Error code %d. Guest clock will not be migrated \"\n-                        \"which could cause the guest to hang.\\n\", r);\n+        warn_report(\"Unable to get guest clock for migration. \"\n+                    \"Error code %d. Guest clock will not be migrated \"\n+                    \"which could cause the guest to hang.\", r);\n         qemu_put_byte(f, S390_TOD_CLOCK_VALUE_MISSING);\n         return;\n     }\n@@ -160,8 +160,8 @@ int gtod_load(QEMUFile *f, void *opaque, int version_id)\n     int r;\n \n     if (qemu_get_byte(f) == S390_TOD_CLOCK_VALUE_MISSING) {\n-        fprintf(stderr, \"WARNING: Guest clock was not migrated. This could \"\n-                        \"cause the guest to hang.\\n\");\n+        warn_report(\"Guest clock was not migrated. This could \"\n+                    \"cause the guest to hang.\");\n         return 0;\n     }\n \n@@ -170,9 +170,9 @@ int gtod_load(QEMUFile *f, void *opaque, int version_id)\n \n     r = s390_set_clock(&tod_high, &tod_low);\n     if (r) {\n-        fprintf(stderr, \"WARNING: Unable to set guest clock value. \"\n-                        \"s390_get_clock returned error %d. This could cause \"\n-                        \"the guest to hang.\\n\", r);\n+        warn_report(\"Unable to set guest clock value. \"\n+                    \"s390_get_clock returned error %d. This could cause \"\n+                    \"the guest to hang.\", r);\n     }\n \n     return 0;\ndiff --git a/net/hub.c b/net/hub.c\nindex afe941ae7a..745a2168a1 100644\n--- a/net/hub.c\n+++ b/net/hub.c\n@@ -310,8 +310,8 @@ void net_hub_check_clients(void)\n         QLIST_FOREACH(port, &hub->ports, next) {\n             peer = port->nc.peer;\n             if (!peer) {\n-                fprintf(stderr, \"Warning: hub port %s has no peer\\n\",\n-                        port->nc.name);\n+                warn_report(\"hub port %s has no peer\",\n+                            port->nc.name);\n                 continue;\n             }\n \n@@ -334,9 +334,8 @@ void net_hub_check_clients(void)\n             warn_report(\"vlan %d with no nics\", hub->id);\n         }\n         if (has_nic && !has_host_dev) {\n-            fprintf(stderr,\n-                    \"Warning: vlan %d is not connected to host network\\n\",\n-                    hub->id);\n+            warn_report(\"vlan %d is not connected to host network\",\n+                        hub->id);\n         }\n     }\n }\ndiff --git a/net/net.c b/net/net.c\nindex bebb042b74..1301cdbd88 100644\n--- a/net/net.c\n+++ b/net/net.c\n@@ -1493,9 +1493,9 @@ void net_check_clients(void)\n \n     QTAILQ_FOREACH(nc, &net_clients, next) {\n         if (!nc->peer) {\n-            fprintf(stderr, \"Warning: %s %s has no peer\\n\",\n-                    nc->info->type == NET_CLIENT_DRIVER_NIC ?\n-                    \"nic\" : \"netdev\", nc->name);\n+            warn_report(\"%s %s has no peer\",\n+                        nc->info->type == NET_CLIENT_DRIVER_NIC ?\n+                        \"nic\" : \"netdev\", nc->name);\n         }\n     }\n \n@@ -1506,10 +1506,10 @@ void net_check_clients(void)\n     for (i = 0; i < MAX_NICS; i++) {\n         NICInfo *nd = &nd_table[i];\n         if (nd->used && !nd->instantiated) {\n-            fprintf(stderr, \"Warning: requested NIC (%s, model %s) \"\n-                    \"was not created (not supported by this machine?)\\n\",\n-                    nd->name ? nd->name : \"anonymous\",\n-                    nd->model ? nd->model : \"unspecified\");\n+            warn_report(\"requested NIC (%s, model %s) \"\n+                        \"was not created (not supported by this machine?)\",\n+                        nd->name ? nd->name : \"anonymous\",\n+                        nd->model ? nd->model : \"unspecified\");\n         }\n     }\n }\ndiff --git a/target/i386/cpu.c b/target/i386/cpu.c\nindex 69676e13e1..7644f6dc2c 100644\n--- a/target/i386/cpu.c\n+++ b/target/i386/cpu.c\n@@ -1766,12 +1766,12 @@ static void report_unavailable_features(FeatureWord w, uint32_t mask)\n         if ((1UL << i) & mask) {\n             const char *reg = get_register_name_32(f->cpuid_reg);\n             assert(reg);\n-            fprintf(stderr, \"warning: %s doesn't support requested feature: \"\n-                \"CPUID.%02XH:%s%s%s [bit %d]\\n\",\n-                kvm_enabled() ? \"host\" : \"TCG\",\n-                f->cpuid_eax, reg,\n-                f->feat_names[i] ? \".\" : \"\",\n-                f->feat_names[i] ? f->feat_names[i] : \"\", i);\n+            warn_report(\"%s doesn't support requested feature: \"\n+                        \"CPUID.%02XH:%s%s%s [bit %d]\",\n+                        kvm_enabled() ? \"host\" : \"TCG\",\n+                        f->cpuid_eax, reg,\n+                        f->feat_names[i] ? \".\" : \"\",\n+                        f->feat_names[i] ? f->feat_names[i] : \"\", i);\n         }\n     }\n }\ndiff --git a/target/i386/hax-mem.c b/target/i386/hax-mem.c\nindex af090343f3..756f2dd268 100644\n--- a/target/i386/hax-mem.c\n+++ b/target/i386/hax-mem.c\n@@ -178,9 +178,9 @@ static void hax_process_section(MemoryRegionSection *section, uint8_t flags)\n     if (!memory_region_is_ram(mr)) {\n         if (memory_region_is_romd(mr)) {\n             /* HAXM kernel module does not support ROMD yet  */\n-            fprintf(stderr, \"%s: Warning: Ignoring ROMD region 0x%016\" PRIx64\n-                    \"->0x%016\" PRIx64 \"\\n\", __func__, start_pa,\n-                    start_pa + size);\n+            warn_report(\"Ignoring ROMD region 0x%016\" PRIx64\n+                        \"->0x%016\" PRIx64 \"\", __func__, start_pa,\n+                        start_pa + size);\n         }\n         return;\n     }\ndiff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c\nindex c827d1e388..49190ec95a 100644\n--- a/target/ppc/translate_init.c\n+++ b/target/ppc/translate_init.c\n@@ -9316,14 +9316,14 @@ static void init_ppc_proc(PowerPCCPU *cpu)\n         env->tlb_per_way = env->nb_tlb / env->nb_ways;\n     }\n     if (env->irq_inputs == NULL) {\n-        fprintf(stderr, \"WARNING: no internal IRQ controller registered.\\n\"\n-                \" Attempt QEMU to crash very soon !\\n\");\n+        warn_report(\"no internal IRQ controller registered.\"\n+                    \" Attempt QEMU to crash very soon !\");\n     }\n #endif\n     if (env->check_pow == NULL) {\n-        fprintf(stderr, \"WARNING: no power management check handler \"\n-                \"registered.\\n\"\n-                \" Attempt QEMU to crash very soon !\\n\");\n+        warn_report(\"no power management check handler \"\n+                    \"registered.\"\n+                    \" Attempt QEMU to crash very soon !\");\n     }\n }\n \n@@ -9877,10 +9877,10 @@ static int ppc_fixup_cpu(PowerPCCPU *cpu)\n      * tree. */\n     if ((env->insns_flags & ~PPC_TCG_INSNS)\n         || (env->insns_flags2 & ~PPC_TCG_INSNS2)) {\n-        fprintf(stderr, \"Warning: Disabling some instructions which are not \"\n-                \"emulated by TCG (0x%\" PRIx64 \", 0x%\" PRIx64 \")\\n\",\n-                env->insns_flags & ~PPC_TCG_INSNS,\n-                env->insns_flags2 & ~PPC_TCG_INSNS2);\n+        warn_report(\"Disabling some instructions which are not \"\n+                    \"emulated by TCG (0x%\" PRIx64 \", 0x%\" PRIx64 \")\",\n+                    env->insns_flags & ~PPC_TCG_INSNS,\n+                    env->insns_flags2 & ~PPC_TCG_INSNS2);\n     }\n     env->insns_flags &= PPC_TCG_INSNS;\n     env->insns_flags2 &= PPC_TCG_INSNS2;\ndiff --git a/ui/keymaps.c b/ui/keymaps.c\nindex 7fa21f81b2..a6cefdaff9 100644\n--- a/ui/keymaps.c\n+++ b/ui/keymaps.c\n@@ -26,6 +26,7 @@\n #include \"keymaps.h\"\n #include \"sysemu/sysemu.h\"\n #include \"trace.h\"\n+#include \"qemu/error-report.h\"\n \n static int get_keysym(const name2keysym_t *table,\n                       const char *name)\n@@ -76,8 +77,8 @@ static void add_keysym(char *line, int keysym, int keycode, kbd_layout_t *k) {\n         k->keysym2keycode[keysym] = keycode;\n     } else {\n         if (k->extra_count >= MAX_EXTRA_COUNT) {\n-            fprintf(stderr, \"Warning: Could not assign keysym %s (0x%x)\"\n-                    \" because of memory constraints.\\n\", line, keysym);\n+            warn_report(\"Could not assign keysym %s (0x%x)\"\n+                        \" because of memory constraints.\", line, keysym);\n         } else {\n             trace_keymap_add(\"extra\", keysym, keycode, line);\n             k->keysym2keycode_extra[k->extra_count].\n@@ -197,8 +198,8 @@ int keysym2scancode(void *kbd_layout, int keysym)\n     if (keysym < MAX_NORMAL_KEYCODE) {\n         if (k->keysym2keycode[keysym] == 0) {\n             trace_keymap_unmapped(keysym);\n-            fprintf(stderr, \"Warning: no scancode found for keysym %d\\n\",\n-                    keysym);\n+            warn_report(\"no scancode found for keysym %d\",\n+                        keysym);\n         }\n         return k->keysym2keycode[keysym];\n     } else {\ndiff --git a/util/main-loop.c b/util/main-loop.c\nindex 2f48f41e62..7558eb5f53 100644\n--- a/util/main-loop.c\n+++ b/util/main-loop.c\n@@ -32,6 +32,7 @@\n #include \"slirp/libslirp.h\"\n #include \"qemu/main-loop.h\"\n #include \"block/aio.h\"\n+#include \"qemu/error-report.h\"\n \n #ifndef _WIN32\n \n@@ -236,9 +237,8 @@ static int os_host_main_loop_wait(int64_t timeout)\n         static bool notified;\n \n         if (!notified && !qtest_enabled() && !qtest_driver()) {\n-            fprintf(stderr,\n-                    \"main-loop: WARNING: I/O thread spun for %d iterations\\n\",\n-                    MAX_MAIN_LOOP_SPIN);\n+            warn_report(\"I/O thread spun for %d iterations\",\n+                        MAX_MAIN_LOOP_SPIN);\n             notified = true;\n         }\n \n",
    "prefixes": [
        "v4",
        "4/8"
    ]
}