get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 614735,
    "url": "http://patchwork.ozlabs.org/api/patches/614735/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/openwrt-patch-20160425-2@vittgam.net/",
    "project": {
        "id": 45,
        "url": "http://patchwork.ozlabs.org/api/projects/45/?format=api",
        "name": "OpenWrt development",
        "link_name": "openwrt",
        "list_id": "openwrt-devel.lists.openwrt.org",
        "list_email": "openwrt-devel@lists.openwrt.org",
        "web_url": "http://openwrt.org/",
        "scm_url": "git://git.openwrt.org/openwrt.git",
        "webscm_url": "https://dev.openwrt.org/browser",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<openwrt-patch-20160425-2@vittgam.net>",
    "list_archive_url": null,
    "date": "2016-04-25T22:54:16",
    "name": "[OpenWrt-Devel,CC] lantiq: Fix LED handling.",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1a8074044f05610189b275401da609c2d51da93b",
    "submitter": {
        "id": 65409,
        "url": "http://patchwork.ozlabs.org/api/people/65409/?format=api",
        "name": "Vittorio Gambaletta",
        "email": "openwrt@vittgam.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openwrt/patch/openwrt-patch-20160425-2@vittgam.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/614735/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/614735/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<openwrt-devel-bounces@lists.openwrt.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "<openwrt-devel@lists.openwrt.org>"
        ],
        "Received": [
            "from arrakis.dune.hu (caladan.dune.hu [78.24.191.180])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3qv1kT1lfrz9sD9\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 Apr 2016 08:54:25 +1000 (AEST)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 5AEA8B91A6C;\n\tTue, 26 Apr 2016 00:54:19 +0200 (CEST)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP;\n\tTue, 26 Apr 2016 00:54:19 +0200 (CEST)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 595E9B91A4E\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tTue, 26 Apr 2016 00:54:18 +0200 (CEST)",
            "from mail.vittgam.net (server1.vittgam.net [213.239.197.142])\n\tby arrakis.dune.hu (Postfix) with ESMTPS\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tTue, 26 Apr 2016 00:54:16 +0200 (CEST)",
            "from vl3 (vl3.r12.network.mietitrebbia.rocks [10.48.6.117])\n\tby mail.vittgam.net with SMTP id u3PMsFT2174978\n\tfor <openwrt-devel@lists.openwrt.org>; Tue, 26 Apr 2016 00:54:16 +0200"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-1.5 required=5.0 tests=BAYES_00\n\tautolearn=unavailable autolearn_force=no version=3.4.1",
        "X-policyd-weight": "using cached result; rate: -6.1",
        "X-DKIM": "OpenDKIM Filter v2.4.2 mail.vittgam.net u3PMsFT2174978",
        "Authentication-Results": "mail.vittgam.net; dkim=none (no signature);\n\tdkim-adsp=none (insecure policy)",
        "Date": "Tue, 26 Apr 2016 00:54:16 +0200",
        "From": "\"Vittorio Gambaletta (VittGam)\" <openwrt@vittgam.net>",
        "To": "<openwrt-devel@lists.openwrt.org>",
        "Message-ID": "<openwrt-patch-20160425-2@vittgam.net>",
        "Subject": "[OpenWrt-Devel] [PATCH] [CC] lantiq: Fix LED handling.",
        "X-BeenThere": "openwrt-devel@lists.openwrt.org",
        "X-Mailman-Version": "2.1.20",
        "Precedence": "list",
        "List-Id": "OpenWrt Development List <openwrt-devel.lists.openwrt.org>",
        "List-Unsubscribe": "<https://lists.openwrt.org/cgi-bin/mailman/options/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.openwrt.org/pipermail/openwrt-devel/>",
        "List-Post": "<mailto:openwrt-devel@lists.openwrt.org>",
        "List-Help": "<mailto:openwrt-devel-request@lists.openwrt.org?subject=help>",
        "List-Subscribe": "<https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "openwrt-devel-bounces@lists.openwrt.org",
        "Sender": "\"openwrt-devel\" <openwrt-devel-bounces@lists.openwrt.org>"
    },
    "content": "Backport of r47914 to CC.\n\nWithout this patch the TDW8970 is left without any status LED at all,\neven during preinit and failsafe.\n\nSigned-off-by: Vittorio Gambaletta <openwrt@vittgam.net>\n---",
    "diff": "diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh\nindex 26f0a3c..57a7055 100644\n--- a/target/linux/lantiq/base-files/etc/diag.sh\n+++ b/target/linux/lantiq/base-files/etc/diag.sh\n@@ -3,40 +3,48 @@\n \n . /lib/functions/leds.sh\n \n-status_led=\"power\"\n+status_led=power\n+[ ! -d /sys/class/leds/power/ ] && [ ! -d /sys/class/leds/power1/ ] && [ ! -d /sys/class/leds/power2/ ] && [ -d /sys/class/leds/wps/ ] && status_led=wps\n \n set_state() {\n-\t[ -d /sys/class/leds/power2/ ] && {\n-\n-\t\tcase \"$1\" in\n-\t\tpreinit)\n-\t\t\tled_set_attr \"power2\" \"trigger\" \"heartbeat\"\n-\t\t\tstatus_led_on\n-\t\t\t;;\n-\t\tfailsafe)\n-\t\t\tled_off \"power2\"\n-\t\t\tstatus_led_set_timer 100 100\n-\t\t\t;;\n-\t\tdone)\n-\t\t\tled_off \"power2\"\n-\t\t\t;;\n-\t\tesac\n-\t\treturn\n-\t}\n-\n \tcase \"$1\" in\n \tpreinit)\n-\t\tstatus_led_set_heartbeat\n+\t\tif [ -d /sys/class/leds/power2/ ]; then\n+\t\t\tstatus_led_on\n+\t\t\tstatus_led=power2\n+\t\t\tstatus_led_blink_preinit\n+\t\t\tstatus_led=power\n+\t\telse\n+\t\t\tstatus_led_blink_preinit\n+\t\tfi\n \t\t;;\n \tfailsafe)\n-\t\t[ -d /sys/class/leds/power1 ] && {\n+\t\tif [ -d /sys/class/leds/power2/ ]; then\n+\t\t\tled_off power2\n+\t\t\tstatus_led_blink_failsafe\n+\t\telif [ -d /sys/class/leds/power1/ ]; then\n \t\t\tstatus_led_off\n-\t\t\tled_timer \"power1\" 100 100\n-\t\t} || status_led_set_timer 100 100\n+\t\t\tstatus_led=power1\n+\t\t\tstatus_led_blink_failsafe\n+\t\t\tstatus_led=power\n+\t\telse\n+\t\t\tstatus_led_blink_failsafe\n+\t\tfi\n+\t\t;;\n+\tpreinit_regular)\n+\t\tif [ -d /sys/class/leds/power2/ ]; then\n+\t\t\tstatus_led_on\n+\t\t\tstatus_led=power2\n+\t\t\tstatus_led_blink_preinit_regular\n+\t\t\tstatus_led=power\n+\t\telse\n+\t\t\tstatus_led_blink_preinit_regular\n+\t\tfi\n \t\t;;\n \tdone)\n \t\tstatus_led_on\n-\t\tled_off \"power1\"\n+\t\tled_off power1\n+\t\tled_off power2\n \t\t;;\n \tesac\n }\n",
    "prefixes": [
        "OpenWrt-Devel",
        "CC"
    ]
}