Show a patch.

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

{
    "id": 16030,
    "url": "https://patchwork.libcamera.org/api/patches/16030/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16030/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20220524225816.6830-5-laurent.pinchart@ideasonboard.com>",
    "date": "2022-05-24T22:58:08",
    "name": "[libcamera-devel,RFC,04/12] test: yaml-parser: Use write() instead of fwrite()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a2001f6ae5c65a1eb4e2809d4105e1d279652f81",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16030/mbox/",
    "series": [
        {
            "id": 3135,
            "url": "https://patchwork.libcamera.org/api/series/3135/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3135",
            "date": "2022-05-24T22:58:04",
            "name": "Replace boost JSON parser with libyaml in Raspberry Pi IPA",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3135/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16030/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16030/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 637BAC3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 24 May 2022 22:58:33 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 13BBB6566D;\n\tWed, 25 May 2022 00:58:32 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DE95F65668\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 May 2022 00:58:26 +0200 (CEST)",
            "from pendragon.ideasonboard.com (ip-109-40-241-133.web.vodafone.de\n\t[109.40.241.133])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 52A349DA;\n\tWed, 25 May 2022 00:58:26 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653433112;\n\tbh=DRsGWBWMLH4h9Mk+gTUka3k+HceDdjisBlEHmLN1iX0=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=0hPOfgsVBBYK6E2gipdpQQfjfV++kmo9mP0sDr9B+wmdbKDCu4AA6zn0POjYTAFRe\n\tizwdaQ64C8PtfSx98d76vC7PgPPXaAJztcpEuolr1SEpqyui2HfKHHDQervhw867qG\n\tEb511JYcK97h+6zDur5JsR6mmgiKNxNMFw1QBklckMKyzRYE5ZT3FClzRr3joxy1ja\n\tnNypCj00KfnTkuCbss/RMgkYkjBITOtfNazinxEWBtiDP/7bVuI4fU2zxDTXy8tfxF\n\tM55JpM3FLWWWe2Uj4DglQbX2iIQ5HxZmnifn0qGgpdIF4bs4zIfMwbn71xkAPBrcQU\n\tfBjRsFy7L8VmA==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1653433106;\n\tbh=DRsGWBWMLH4h9Mk+gTUka3k+HceDdjisBlEHmLN1iX0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=pSOQkHnkMKs5lwttEiOBQOT48ZBeItkDoklXMsHfb0vp1hL3XVDFMwzA52nMRQj9X\n\tmVp41rqShCpvu5r8NCSFOMdzCdJiIUS43H1uzDtB1YFR/rxQOmurr51Oskphn8qhR5\n\tMZO5q6z30LQspyNsUDHMlB8f5p3OTx4AE/Bi1ujE="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"pSOQkHnk\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 25 May 2022 01:58:08 +0300",
        "Message-Id": "<20220524225816.6830-5-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20220524225816.6830-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220524225816.6830-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [RFC PATCH 04/12] test: yaml-parser: Use write()\n\tinstead of fwrite()",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "There's no point in wrapping a fd into a FILE to then only call fwrite()\nand fclose(). Use write() and close() directly.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/yaml-parser.cpp | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/test/yaml-parser.cpp b/test/yaml-parser.cpp\nindex 959a657478fa..944b564bbe22 100644\n--- a/test/yaml-parser.cpp\n+++ b/test/yaml-parser.cpp\n@@ -48,10 +48,11 @@ protected:\n \t\tif (fd == -1)\n \t\t\treturn false;\n \n-\t\tFILE *fh = fdopen(fd, \"w\");\n-\t\tfputs(content.c_str(), fh);\n+\t\tint ret = write(fd, content.c_str(), content.size());\n+\t\tclose(fd);\n \n-\t\tfclose(fh);\n+\t\tif (ret != static_cast<int>(content.size()))\n+\t\t\treturn false;\n \n \t\treturn true;\n \t}\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "04/12"
    ]
}