Show a patch.

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

{
    "id": 252,
    "url": "https://patchwork.libcamera.org/api/patches/252/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/252/",
    "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": "<20190116135949.2097-4-jacopo@jmondi.org>",
    "date": "2019-01-16T13:59:47",
    "name": "[libcamera-devel,v2,3/5] libcamera: media_object: Set devnode in MediaEntity",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5e40bb8191ca7ed228cd961899f479a734b4fa77",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/252/mbox/",
    "series": [
        {
            "id": 85,
            "url": "https://patchwork.libcamera.org/api/series/85/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=85",
            "date": "2019-01-16T13:59:44",
            "name": "libcamera: pipeline: Add Intel IPU3 pipeline handler",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/85/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/252/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/252/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E23AD60C9A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Jan 2019 14:59:50 +0100 (CET)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 6E212C0008;\n\tWed, 16 Jan 2019 13:59:50 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 16 Jan 2019 14:59:47 +0100",
        "Message-Id": "<20190116135949.2097-4-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190116135949.2097-1-jacopo@jmondi.org>",
        "References": "<20190116135949.2097-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 3/5] libcamera: media_object: Set\n\tdevnode in MediaEntity",
        "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, 16 Jan 2019 13:59:51 -0000"
    },
    "content": "The MediaEntity::setDeviceNode() function was designed to set the device\nnode path associated with a MediaEntity. The function was there, but the\ndevnode_ member field was never actually set. Fix this.\n\nWhile at there add a getter method for the devnode_ member as it will\nsoon be used.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/include/media_object.h |  1 +\n src/libcamera/media_object.cpp       | 11 +++++++++++\n 2 files changed, 12 insertions(+)",
    "diff": "diff --git a/src/libcamera/include/media_object.h b/src/libcamera/include/media_object.h\nindex a10f7e1..fad55a0 100644\n--- a/src/libcamera/include/media_object.h\n+++ b/src/libcamera/include/media_object.h\n@@ -85,6 +85,7 @@ class MediaEntity : public MediaObject\n public:\n \tconst std::string &name() const { return name_; }\n \tunsigned int function() const { return function_; }\n+\tconst std::string &devnode() const { return devnode_; }\n \tunsigned int deviceMajor() const { return major_; }\n \tunsigned int deviceMinor() const { return minor_; }\n \ndiff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp\nindex 76dd326..4e90443 100644\n--- a/src/libcamera/media_object.cpp\n+++ b/src/libcamera/media_object.cpp\n@@ -263,6 +263,15 @@ void MediaPad::addLink(MediaLink *link)\n  * \\return The entity's function\n  */\n \n+/**\n+ * \\fn MediaEntity::devnode()\n+ * \\brief Retrieve the entity's device node path, if any\n+ *\n+ * \\sa int MediaEntity::setDeviceNode(const std::string &devnode)\n+ *\n+ * \\return The entity's device node path, or an empty string if it is not set\n+ */\n+\n /**\n  * \\fn MediaEntity::deviceMajor()\n  * \\brief Retrieve the major number of the interface associated with the entity\n@@ -330,6 +339,8 @@ int MediaEntity::setDeviceNode(const std::string &devnode)\n \t\treturn ret;\n \t}\n \n+\tdevnode_ = devnode;\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "3/5"
    ]
}