Show a patch.

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

{
    "id": 1467,
    "url": "https://patchwork.libcamera.org/api/patches/1467/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1467/",
    "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": "<20190619105047.15380-1-laurent.pinchart@ideasonboard.com>",
    "date": "2019-06-19T10:50:47",
    "name": "[libcamera-devel] cam: Support base 16 and base 8 when parsing integer options",
    "commit_ref": "20807a8c17e629b93d293ef0a0bdbd686ce84823",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ff7aa1bb53264700bbbc78340138cc14e5e57148",
    "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/1467/mbox/",
    "series": [
        {
            "id": 362,
            "url": "https://patchwork.libcamera.org/api/series/362/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=362",
            "date": "2019-06-19T10:50:47",
            "name": "[libcamera-devel] cam: Support base 16 and base 8 when parsing integer options",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/362/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1467/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1467/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@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 A5EC96194F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Jun 2019 12:51:23 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2D2E7333\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Jun 2019 12:51:23 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1560941483;\n\tbh=/iOvKFZJxaKLgsFICqXuOq6fX3HLjCKtzyAPwIrLFKY=;\n\th=From:To:Subject:Date:From;\n\tb=okIGrphiUxIW2hDRwu38eCnFBmCw5MbGDWD+nfjx21AQYN1uOeC+npPdpMTYX7IwR\n\tqktnsgJqigCY0+40+cjABcfv6q2Wxl2NooZBzIvwBbICGG+vzNS4LrQ4PcwKVBCsju\n\tzgGByVvqSlLHCNfFIk/tWyS6jkQxYcfhLTfEElpY=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 19 Jun 2019 13:50:47 +0300",
        "Message-Id": "<20190619105047.15380-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] cam: Support base 16 and base 8 when\n\tparsing integer options",
        "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": "Wed, 19 Jun 2019 10:51:23 -0000"
    },
    "content": "Integer options have to use base 10. This isn't user-friendly when\nspecifying pixel formats. Detect the base automatically to support base\n16. As a side effect, integer values starting with 0 will be interpreted\nin base 8.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/cam/options.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/src/cam/options.cpp b/src/cam/options.cpp\nindex bea4a600d1d5..7c3948df3b5c 100644\n--- a/src/cam/options.cpp\n+++ b/src/cam/options.cpp\n@@ -79,7 +79,7 @@ bool OptionsBase<T>::parseValue(const T &opt, const Option &option,\n \n \t\tif (optarg) {\n \t\t\tchar *endptr;\n-\t\t\tinteger = strtoul(optarg, &endptr, 10);\n+\t\t\tinteger = strtoul(optarg, &endptr, 0);\n \t\t\tif (*endptr != '\\0')\n \t\t\t\treturn false;\n \t\t} else {\n",
    "prefixes": [
        "libcamera-devel"
    ]
}