get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 627551,
    "url": "http://patchwork.ozlabs.org/api/patches/627551/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/lede/patch/1464565158-18043-5-git-send-email-champetier.etienne@gmail.com/",
    "project": {
        "id": 54,
        "url": "http://patchwork.ozlabs.org/api/projects/54/?format=api",
        "name": "LEDE development",
        "link_name": "lede",
        "list_id": "lede-dev.lists.infradead.org",
        "list_email": "lede-dev@lists.infradead.org",
        "web_url": "http://lede-project.org/",
        "scm_url": "",
        "webscm_url": "http://git.lede-project.org/",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1464565158-18043-5-git-send-email-champetier.etienne@gmail.com>",
    "list_archive_url": null,
    "date": "2016-05-29T23:39:16",
    "name": "[LEDE-DEV,procd,5/7] jail: improve some logs",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d77d1b86f90e69e829b8f4f81bbf68db2434e64c",
    "submitter": {
        "id": 65689,
        "url": "http://patchwork.ozlabs.org/api/people/65689/?format=api",
        "name": "Etienne Champetier",
        "email": "champetier.etienne@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/lede/patch/1464565158-18043-5-git-send-email-champetier.etienne@gmail.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/627551/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/627551/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n\t[IPv6:2001:1868:205::9])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3rHx8V11x7z9t3q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 30 May 2016 09:40:58 +1000 (AEST)",
            "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux))\n\tid 1b7AJD-0007z1-PX; Sun, 29 May 2016 23:39:51 +0000",
            "from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243])\n\tby bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat\n\tLinux)) id 1b7AJA-0007w9-9e\n\tfor lede-dev@lists.infradead.org; Sun, 29 May 2016 23:39:49 +0000",
            "by mail-wm0-x243.google.com with SMTP id a136so17615851wme.0\n\tfor <lede-dev@lists.infradead.org>;\n\tSun, 29 May 2016 16:39:30 -0700 (PDT)",
            "from ubuntu1404.lxcnattst (ns623510.ovh.net. [5.135.134.9])\n\tby smtp.gmail.com with ESMTPSA id\n\t124sm20721292wml.12.2016.05.29.16.39.28\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSun, 29 May 2016 16:39:28 -0700 (PDT)"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com header.b=Gu4gZ8il;\n\tdkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=DWG2yoipOD/t1dRdyA/URZmsTO4Q8uBQ1+2et83jZkQ=;\n\tb=Gu4gZ8ilS1Ia4DLgPk7LoJi7Plu8wNCnQ39SdRfAqYdVkYrfMu77ncSHKwl8vWyFrz\n\tKWEMMviVOtrJhD6PGn0e78OWS6jZXe0Umq4SWOHdJRciICOMjzjaXkWK8qr9i0+wNSkd\n\tDuFyOgnzPc5z9MjJUiW51zaxCNYOS1FxEocckeSgl+UEHIFQHJ8Z8IoofdHNt8jiZunq\n\twstD7ZqpvZ5kLRJTQhd/2H0+o7eU9UI7PPfety25JP3lzPh+o2MGcMtRmQG3SH18zXHA\n\tJSpyRM01NOzi7UMS+Ljbag9snbsyDsspLPfe5jjhWa1PhY6U9639Dcse3wUu1Kkr0hmv\n\taiSw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=DWG2yoipOD/t1dRdyA/URZmsTO4Q8uBQ1+2et83jZkQ=;\n\tb=NPHKD+72x+A6OpmulW4BYWrh6xUscJglv1SbYPYnhWLqJPXTXkjmQLYGwS8emlWsE1\n\te/FEMUX5UWffKBSMUE4t1RanuVpt6uoMJB7WwWT/3SybdHIZ70iQwiZ0nw29asiyjdH+\n\tYWjDU8j0WCuQH8/oiYZtewC7nFxyP8aPSLJ0bRBoxthZEgCbmcH4pNmdqKPMeIEd+jub\n\tCjfWKp66NcjpKt9OD7vLe4weB9Qh4ixTRD3hkkMu9OZRate9Wbz8ym2WQunga/4X9Mco\n\tp95UAyofURyyBDrS0aCQwmSYJOnnvILFS8QCEdAB4sG35fLCcSTMDmf98tKYN5FS7v8l\n\t2JMw==",
        "X-Gm-Message-State": "ALyK8tLH9VAww+OtR9yAm3nuNE/Yi3XIumTRbWlNSNdyLu3B3IP6dmoXSJ05cvd4K2vbZw==",
        "X-Received": "by 10.28.47.212 with SMTP id v203mr8586845wmv.5.1464565168932;\n\tSun, 29 May 2016 16:39:28 -0700 (PDT)",
        "From": "Etienne CHAMPETIER <champetier.etienne@gmail.com>",
        "To": "lede-dev@lists.infradead.org",
        "Date": "Sun, 29 May 2016 23:39:16 +0000",
        "Message-Id": "<1464565158-18043-5-git-send-email-champetier.etienne@gmail.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1464565158-18043-1-git-send-email-champetier.etienne@gmail.com>",
        "References": "<1464565158-18043-1-git-send-email-champetier.etienne@gmail.com>",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20160529_163948_528594_7A1D1F7E ",
        "X-CRM114-Status": "GOOD (  11.35  )",
        "X-Spam-Score": "-2.7 (--)",
        "X-Spam-Report": "SpamAssassin version 3.4.0 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2a00:1450:400c:c09:0:0:0:243 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (champetier.etienne[at]gmail.com)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid",
        "Subject": "[LEDE-DEV] [PATCH procd 5/7] jail: improve some logs",
        "X-BeenThere": "lede-dev@lists.infradead.org",
        "X-Mailman-Version": "2.1.20",
        "Precedence": "list",
        "List-Id": "<lede-dev.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/lede-dev/>",
        "List-Post": "<mailto:lede-dev@lists.infradead.org>",
        "List-Help": "<mailto:lede-dev-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>",
        "Cc": "Etienne CHAMPETIER <champetier.etienne@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>",
        "Errors-To": "lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>\n---\n jail/fs.c   |  4 ++--\n jail/jail.c | 14 +++++++-------\n 2 files changed, 9 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/jail/fs.c b/jail/fs.c\nindex f390180..c4cdcc9 100644\n--- a/jail/fs.c\n+++ b/jail/fs.c\n@@ -86,7 +86,7 @@ static int add_script_interp(const char *path, const char *map, int size)\n \t\tstart++;\n \t}\n \tif (start >= size) {\n-\t\tERROR(\"bad script interp (%s)\", path);\n+\t\tERROR(\"bad script interp (%s)\\n\", path);\n \t\treturn -1;\n \t}\n \tint stop = start + 1;\n@@ -94,7 +94,7 @@ static int add_script_interp(const char *path, const char *map, int size)\n \t\tstop++;\n \t}\n \tif (stop >= size || (stop-start) > PATH_MAX) {\n-\t\tERROR(\"bad script interp (%s)\", path);\n+\t\tERROR(\"bad script interp (%s)\\n\", path);\n \t\treturn -1;\n \t}\n \tchar buf[PATH_MAX];\ndiff --git a/jail/jail.c b/jail/jail.c\nindex 03ff66c..b3f27d3 100644\n--- a/jail/jail.c\n+++ b/jail/jail.c\n@@ -76,7 +76,7 @@ static int mkdir_p(char *dir, mode_t mask)\n \t\treturn 0;\n \n \tif (ret)\n-\t\tERROR(\"mkdir failed on %s: %s\\n\", dir, strerror(errno));\n+\t\tERROR(\"mkdir(%s, %d) failed: %s\\n\", dir, mask, strerror(errno));\n \n \treturn ret;\n }\n@@ -100,7 +100,7 @@ int mount_bind(const char *root, const char *path, int readonly, int error)\n \t\tsnprintf(new, sizeof(new), \"%s%s\", root, path);\n \t\tfd = creat(new, 0644);\n \t\tif (fd == -1) {\n-\t\t\tERROR(\"failed to create %s: %s\\n\", new, strerror(errno));\n+\t\t\tERROR(\"creat(%s) failed: %s\\n\", new, strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \t\tclose(fd);\n@@ -116,7 +116,7 @@ int mount_bind(const char *root, const char *path, int readonly, int error)\n \t\treturn -1;\n \t}\n \n-\tDEBUG(\"mount -B %s %s\\n\", path, new);\n+\tDEBUG(\"mount -B %s %s (%s)\\n\", path, new, readonly?\"ro\":\"rw\");\n \n \treturn 0;\n }\n@@ -125,7 +125,7 @@ static int build_jail_fs(void)\n {\n \tchar jail_root[] = \"/tmp/ujail-XXXXXX\";\n \tif (mkdtemp(jail_root) == NULL) {\n-\t\tERROR(\"mkdtemp(jail_root) failed: %s\\n\", strerror(errno));\n+\t\tERROR(\"mkdtemp(%s) failed: %s\\n\", jail_root, strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -135,7 +135,7 @@ static int build_jail_fs(void)\n \t}\n \n \tif (chdir(jail_root)) {\n-\t\tERROR(\"failed to chdir() in the jail root\\n\");\n+\t\tERROR(\"chdir(%s) (jail_root) failed: %s\\n\", jail_root, strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -149,11 +149,11 @@ static int build_jail_fs(void)\n \tmkdir(dirbuf, 0755);\n \n \tif (pivot_root(jail_root, dirbuf) == -1) {\n-\t\tERROR(\"pivot_root failed: %s\\n\", strerror(errno));\n+\t\tERROR(\"pivot_root(%s, %s) failed: %s\\n\", jail_root, dirbuf, strerror(errno));\n \t\treturn -1;\n \t}\n \tif (chdir(\"/\")) {\n-\t\tERROR(\"chdir(/) failed: %s\\n\", strerror(errno));\n+\t\tERROR(\"chdir(/) (after pivot_root) failed: %s\\n\", strerror(errno));\n \t\treturn -1;\n \t}\n \n",
    "prefixes": [
        "LEDE-DEV",
        "procd",
        "5/7"
    ]
}