Show a patch.

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

{
    "id": 17694,
    "url": "https://patchwork.libcamera.org/api/patches/17694/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17694/",
    "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": "<20221027055515.321791-6-nicholas@rothemail.net>",
    "date": "2022-10-27T05:55:10",
    "name": "[libcamera-devel,05/10] android: remove references to std::filesystem",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "e29a964941f5b6701f9c611effecfb34f0ee77f1",
    "submitter": {
        "id": 97,
        "url": "https://patchwork.libcamera.org/api/people/97/?format=api",
        "name": "Nicolas Dufresne via libcamera-devel",
        "email": "libcamera-devel@lists.libcamera.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17694/mbox/",
    "series": [
        {
            "id": 3579,
            "url": "https://patchwork.libcamera.org/api/series/3579/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3579",
            "date": "2022-10-27T05:55:08",
            "name": "[libcamera-devel,01/10] ipa: workaround libcxx duration limitation",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3579/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17694/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17694/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 25327BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Oct 2022 05:55:31 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D686162F81;\n\tThu, 27 Oct 2022 07:55:30 +0200 (CEST)",
            "from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com\n\t[IPv6:2001:4860:4864:20::2c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 777FA62F72\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Oct 2022 07:55:25 +0200 (CEST)",
            "by mail-oa1-x2c.google.com with SMTP id\n\t586e51a60fabf-1322d768ba7so686373fac.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Oct 2022 22:55:25 -0700 (PDT)",
            "from nroth-pc.attlocal.net\n\t([2600:1700:20:20c0:6406:fc7a:e46d:1666])\n\tby smtp.gmail.com with ESMTPSA id\n\t9-20020a9d0c09000000b00661a05691fasm140021otr.79.2022.10.26.22.55.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Oct 2022 22:55:24 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666850130;\n\tbh=VC4UXiQtmAqvM3MJoJ2zyKm2mTdDppUMqAGYempxtm8=;\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:Cc:\n\tFrom;\n\tb=w6IxqA0cXV/XsOZutI6a32CMobHGYmXKaOhBLF15HcGw2q96wYXiU3quyMMjvTUar\n\tMR6ADoYkPApoeQ9J2WSf2Ae7tkDDsy6PZqF742gxhCr9DGFoxUGPPjpUoTYBSiEQFo\n\tYcjirKG4OWAQ47FPLinVUJxBkfF2M6PSs3a7mOml0SOyAhi/vXfeJJbFxabWm8RPfg\n\t8R2KtY0zdtwJvcgpDTGBDDcaY0u6N2mk3becAH5XLWRg7nVuFCgmbiQd9S6RIyLhyV\n\tzgpW7TCm2JuiMxM5UTTB4dQZGdU5O2d3IexYD74F8Zi2zePKkmY2j7qlwE38MtcxH8\n\tkM1KDmT1TjfZw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=rothemail-net.20210112.gappssmtp.com; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=hXexP+WvSpiEJbh2BQUsXDVGOmbAlgv40vpUmNc+sDs=;\n\tb=LwlKYPbaT/aTkWedHZMtDnEbJ2yLxt1YlYlkeoC58oCCKwrcMeo74bAfbrEIYiFglS\n\tA1/oLx5HfvJj/+hg3GzokVaHyJtWtKfBFG4cC7A5I7wEoqICSbJBRlgAXBbJRQo75i/B\n\tMPRM6S9i1M/jx8HxXf6OdiZMuW5M9KWDgyF+VyfHDcmwdAN6mizlzeMeXVXd3AwbBM+Q\n\tYRF0QfCRv2/NvliQq+2j/qymNc/3dZI1UGHjEey+ThFxtdT9l79mkSc0zIbaPrAne3N3\n\tae3bBdfWC1PLFSxRQfBqvtV/8E5yjoJEOLWHqQEviO/0hDMoS0nhLf9MhMW/luBmlY4b\n\tnkzQ=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=rothemail-net.20210112.gappssmtp.com\n\theader.i=@rothemail-net.20210112.gappssmtp.com header.b=\"LwlKYPba\"; \n\tdkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=hXexP+WvSpiEJbh2BQUsXDVGOmbAlgv40vpUmNc+sDs=;\n\tb=WX9NUVnDtYfb5sKfYcZSwgshy7XRJy9huNrxF8gupEdYfKVUR2rTG54r9awfqIXPTx\n\tq2m9yGai9rXkLnY20aUJenwPw12IAB2M9wWP0KtcX5wJVsh+e53A0AtYcL88fOCX0N60\n\tOer8degBWGy1XdaFpmEqrjaMYoM7XOT5qcbodvR/F1y26btYpAdBOISaaGH7Pn8OlbET\n\t+iyvdAdBPT3kXRtjei8dXZtmokXBYTtvyoIne+jD1H/PTUk4M4V8fi41W2A+cl5NaKl8\n\tI8aChp3wbCL49BL5B02TEi8N38h23s33me95QULAdknL+8IShbObO4jd9PwVBlPJo+A/\n\tTsAw==",
        "X-Gm-Message-State": "ACrzQf1WNtFAzLXaPIIzoHZ+Y5fS6DN8f1WKNN8RWK0NHppnCohLfQbT\n\th7YiQxF7YGT65KbvdVPrLYhSsqQEVEjdNmOZ",
        "X-Google-Smtp-Source": "AMsMyM5fGxaTbJq+MJGlku5ABtHXEqy3pFNPHESFcW1jYsxNKJYJxBZMqq4LqokNUoNmDfAIk5UyyA==",
        "X-Received": "by 2002:a05:6870:d18f:b0:13b:a366:f448 with SMTP id\n\ta15-20020a056870d18f00b0013ba366f448mr4480755oac.209.1666850124742; \n\tWed, 26 Oct 2022 22:55:24 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 27 Oct 2022 00:55:10 -0500",
        "Message-Id": "<20221027055515.321791-6-nicholas@rothemail.net>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20221027055515.321791-1-nicholas@rothemail.net>",
        "References": "<libcamera Android Enhancements>\n\t<20221027055515.321791-1-nicholas@rothemail.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 05/10] android: remove references to\n\tstd::filesystem",
        "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": "Nicholas Roth via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "libcamera-devel@lists.libcamera.org",
        "Cc": "nicholas@rothemail.net",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Nicholas Roth <nicholas@rothemail.net>\n\nAndroid 11's toolchain does not support std::filesystem, but\ncamera_hal_config.cpp currently uses it. Remove references to\nstd::filesystem in order to support Android <= 11.\n\nThis adds a very small difference in behaviour, as File::exist() will\nreturn true for special files (pipes, character or block devices, ...)\nwhile std::filesystem::is_regular_file() doesn't, but I consider this\nto be a corner case that doesn't matter much.\n\nSigned-off-by: Nicholas Roth <nicholas@rothemail.net>\n---\n src/android/camera_hal_config.cpp | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp\nindex bacfe4b9..6fd71162 100644\n--- a/src/android/camera_hal_config.cpp\n+++ b/src/android/camera_hal_config.cpp\n@@ -6,7 +6,6 @@\n  */\n #include \"camera_hal_config.h\"\n \n-#include <filesystem>\n #include <stdlib.h>\n #include <string>\n \n@@ -160,15 +159,15 @@ CameraHalConfig::CameraHalConfig()\n  */\n int CameraHalConfig::parseConfigurationFile()\n {\n-\tstd::filesystem::path filePath = LIBCAMERA_SYSCONF_DIR;\n-\tfilePath /= \"camera_hal.yaml\";\n-\tif (!std::filesystem::is_regular_file(filePath)) {\n+\tstd::string filePath = LIBCAMERA_SYSCONF_DIR \"/camera_hal.yaml\";\n+\n+\tFile file(filePath);\n+\tif (!file.exists()) {\n \t\tLOG(HALConfig, Debug)\n-\t\t\t<< \"Configuration file: \\\"\" << filePath << \"\\\" not found\";\n+\t\t\t\t\t<< \"Configuration file: \\\"\" << filePath << \"\\\" not found\";\n \t\treturn -ENOENT;\n \t}\n \n-\tFile file(filePath);\n \tif (!file.open(File::OpenModeFlag::ReadOnly)) {\n \t\tint ret = file.error();\n \t\tLOG(HALConfig, Error) << \"Failed to open configuration file \"\n",
    "prefixes": [
        "libcamera-devel",
        "05/10"
    ]
}