Show a patch.

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

{
    "id": 48,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/48/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/48/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20181214085909.32325-1-kieran.bingham@ideasonboard.com>",
    "date": "2018-12-14T08:59:09",
    "name": "[libcamera-devel] log: Use libgen implementation of basename",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "9a983b7b5afc1944fcded7ec84ebbe4e5baaab9e",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/48/mbox/",
    "series": [
        {
            "id": 23,
            "url": "https://patchwork.libcamera.org/api/1.1/series/23/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=23",
            "date": "2018-12-14T08:59:09",
            "name": "[libcamera-devel] log: Use libgen implementation of basename",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/23/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/48/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/48/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 17E2660B10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Dec 2018 09:59:12 +0100 (CET)",
            "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 97F6E549;\n\tFri, 14 Dec 2018 09:59:11 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1544777951;\n\tbh=v9Lu/OC6meoWttFh86Q/ubU83ez1BcUQakRMRJHhCZw=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=QfugnJSw6dbArawj0ZyT6D6VBRjjTanObmhH+9Czl0dClvu7l2yXOrP6xppkoT9LR\n\tXvQ4PSbrIgu2mjINJo3oJyBns4fstlaYUEgInz6NIIPuDTjTvUrNmHXCpkAynIBTqq\n\tK3HeoBPze2s2P6ymbD1bNlKwWTR98uq2VuhgwaB0=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Fri, 14 Dec 2018 08:59:09 +0000",
        "Message-Id": "<20181214085909.32325-1-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[libcamera-devel] [PATCH] log: Use libgen implementation of basename",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "X-List-Received-Date": "Fri, 14 Dec 2018 08:59:12 -0000"
    },
    "content": "Pull in the libgen header to define basename. Unfortuantely this\nrequires casting away the const flag on the filename.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/log.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp\nindex 3715e69d810e..7096071e53f6 100644\n--- a/src/libcamera/log.cpp\n+++ b/src/libcamera/log.cpp\n@@ -9,6 +9,7 @@\n #include <ctime>\n #include <iomanip>\n #include <string.h>\n+#include <libgen.h>\n \n #include \"log.h\"\n #include \"utils.h\"\n@@ -80,7 +81,7 @@ LogMessage::LogMessage(const char *fileName, unsigned int line,\n \t\t  << std::setw(9) << timestamp.tv_nsec << \"]\";\n \n \tmsgStream << \" \" << log_severity_name(severity);\n-\tmsgStream << \" \" << basename(fileName) << \":\" << line << \" \";\n+\tmsgStream << \" \" << basename((char *)fileName) << \":\" << line << \" \";\n }\n \n LogMessage::~LogMessage()\n",
    "prefixes": [
        "libcamera-devel"
    ]
}