get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 632624,
    "url": "http://patchwork.ozlabs.org/api/patches/632624/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/petitboot/patch/20160609045909.17049-1-sam@mendozajonas.com/",
    "project": {
        "id": 53,
        "url": "http://patchwork.ozlabs.org/api/projects/53/?format=api",
        "name": "Petitboot development",
        "link_name": "petitboot",
        "list_id": "petitboot.lists.ozlabs.org",
        "list_email": "petitboot@lists.ozlabs.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20160609045909.17049-1-sam@mendozajonas.com>",
    "list_archive_url": null,
    "date": "2016-06-09T04:59:07",
    "name": "[1/3] discover/device-handler: Make boot_status() public",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "c1ee4201dfc4163894630a6bd7bdede6da073952",
    "submitter": {
        "id": 68013,
        "url": "http://patchwork.ozlabs.org/api/people/68013/?format=api",
        "name": "Sam Mendoza-Jonas",
        "email": "sam@mendozajonas.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/petitboot/patch/20160609045909.17049-1-sam@mendozajonas.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/632624/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/632624/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "petitboot@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "petitboot@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\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 3rQClJ317Dz9sf9\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  9 Jun 2016 14:59:24 +1000 (AEST)",
            "from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3rQClJ21KBzDqGL\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  9 Jun 2016 14:59:24 +1000 (AEST)",
            "from mendozajonas.com (mendozajonas.com [188.166.185.233])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3rQClF0jVJzDq5W\n\tfor <petitboot@lists.ozlabs.org>;\n\tThu,  9 Jun 2016 14:59:21 +1000 (AEST)",
            "from skellige.ozlabs.ibm.com (unknown [122.99.82.10])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (Client did not present a certificate)\n\t(Authenticated sender: sam@mendozajonas.com)\n\tby mendozajonas.com (Postfix) with ESMTPSA id 0C68B140053\n\tfor <petitboot@lists.ozlabs.org>;\n\tThu,  9 Jun 2016 12:59:14 +0800 (SGT)"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=mendozajonas.com header.i=@mendozajonas.com\n\theader.b=aN/AFoIS; dkim-atps=neutral",
            "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=mendozajonas.com header.i=@mendozajonas.com\n\theader.b=aN/AFoIS; dkim-atps=neutral",
            "lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=mendozajonas.com header.i=@mendozajonas.com\n\theader.b=aN/AFoIS; dkim-atps=neutral"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mendozajonas.com;\n\ts=mail; t=1465448355;\n\tbh=yq0aEVywxBD4JbuDwwYlrnlMsGKzl1uAzghznwMjZQY=;\n\th=From:To:Subject:Date:From;\n\tb=aN/AFoISUf0yqyYCZwZW9TO9sOTUkPEkbBIUGcqd3MjUAHBIV59q6tjhRiuqz3aDP\n\tgM+IeWfRJSf61Chz10dtPGCJKsLqVSCsNLofM8taVcjwKH2y03foHF5wQ9ybdpifHx\n\tF0/Bb4lkGsIvqqzyFRTnbdmeQhY0A7gCF8dQuI0w=",
        "From": "Samuel Mendoza-Jonas <sam@mendozajonas.com>",
        "To": "petitboot@lists.ozlabs.org",
        "Subject": "[PATCH 1/3] discover/device-handler: Make boot_status() public",
        "Date": "Thu,  9 Jun 2016 14:59:07 +1000",
        "Message-Id": "<20160609045909.17049-1-sam@mendozajonas.com>",
        "X-Mailer": "git-send-email 2.8.3",
        "X-BeenThere": "petitboot@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.22",
        "Precedence": "list",
        "List-Id": "Petitboot bootloader development <petitboot.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/petitboot>,\n\t<mailto:petitboot-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/petitboot/>",
        "List-Post": "<mailto:petitboot@lists.ozlabs.org>",
        "List-Help": "<mailto:petitboot-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/petitboot>,\n\t<mailto:petitboot-request@lists.ozlabs.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Petitboot\"\n\t<petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"
    },
    "content": "Rename boot_status() to device_handler_boot_status() and make it\naccessible by files that include device-handler.h. This enables the boot\nstatus to be updated from additional callers, in particular within\nparser functions.\n\nSigned-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>\n---\n discover/device-handler.c | 21 +++++++++++----------\n discover/device-handler.h |  3 +++\n 2 files changed, 14 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/discover/device-handler.c b/discover/device-handler.c\nindex cc48747..1c69de0 100644\n--- a/discover/device-handler.c\n+++ b/discover/device-handler.c\n@@ -396,7 +396,7 @@ void device_handler_remove(struct device_handler *handler,\n \ttalloc_free(device);\n }\n \n-static void boot_status(void *arg, struct boot_status *status)\n+void device_handler_boot_status(void *arg, struct boot_status *status)\n {\n \tstruct device_handler *handler = arg;\n \n@@ -448,7 +448,8 @@ static int default_timeout(void *arg)\n \tplatform_pre_boot();\n \n \thandler->pending_boot = boot(handler, handler->default_boot_option,\n-\t\t\tNULL, handler->dry_run, boot_status, handler);\n+\t\t\tNULL, handler->dry_run, device_handler_boot_status,\n+\t\t\thandler);\n \thandler->pending_boot_is_default = true;\n \treturn 0;\n }\n@@ -873,7 +874,7 @@ int device_handler_discover(struct device_handler *handler,\n \tstatus->message = talloc_asprintf(status, _(\"Processing %s device %s\"),\n \t\t\t\tdevice_type_display_name(dev->device->type),\n \t\t\t\tdev->device->id);\n-\tboot_status(handler, status);\n+\tdevice_handler_boot_status(handler, status);\n \n \tprocess_boot_option_queue(handler);\n \n@@ -901,7 +902,7 @@ out:\n \t */\n \tstatus->message = talloc_asprintf(status,_(\"Processing %s complete\"),\n \t\t\t\tdev->device->id);\n-\tboot_status(handler, status);\n+\tdevice_handler_boot_status(handler, status);\n \n \ttalloc_free(status);\n \ttalloc_free(ctx);\n@@ -924,7 +925,7 @@ int device_handler_dhcp(struct device_handler *handler,\n \t */\n \tstatus->message = talloc_asprintf(status, _(\"Processing dhcp event on %s\"),\n \t\t\t\tdev->device->id);\n-\tboot_status(handler, status);\n+\tdevice_handler_boot_status(handler, status);\n \n \t/* create our context */\n \tctx = device_handler_discover_context_create(handler, dev);\n@@ -940,7 +941,7 @@ int device_handler_dhcp(struct device_handler *handler,\n \t */\n \tstatus->message = talloc_asprintf(status,_(\"Processing %s complete\"),\n \t\t\t\tdev->device->id);\n-\tboot_status(handler, status);\n+\tdevice_handler_boot_status(handler, status);\n \n \ttalloc_free(status);\n \ttalloc_free(ctx);\n@@ -958,7 +959,7 @@ int device_handler_conf(struct device_handler *handler,\n \tstatus = talloc_zero(handler, struct boot_status);\n \tstatus->type = BOOT_STATUS_INFO;\n \tstatus->message = talloc_asprintf(status, _(\"Processing user config\"));\n-\tboot_status(handler, status);\n+\tdevice_handler_boot_status(handler, status);\n \n \t/* create our context */\n \tctx = device_handler_discover_context_create(handler, dev);\n@@ -970,7 +971,7 @@ int device_handler_conf(struct device_handler *handler,\n \n \tstatus->message = talloc_asprintf(status,\n \t\t\t\t_(\"Processing user config complete\"));\n-\tboot_status(handler, status);\n+\tdevice_handler_boot_status(handler, status);\n \n \ttalloc_free(status);\n \ttalloc_free(ctx);\n@@ -1009,7 +1010,7 @@ void device_handler_boot(struct device_handler *handler,\n \tplatform_pre_boot();\n \n \thandler->pending_boot = boot(handler, opt, cmd, handler->dry_run,\n-\t\t\tboot_status, handler);\n+\t\t\tdevice_handler_boot_status, handler);\n \thandler->pending_boot_is_default = false;\n }\n \n@@ -1211,7 +1212,7 @@ void device_handler_process_url(struct device_handler *handler,\n \tstatus->message = talloc_asprintf(status, _(\"Config file %s parsed\"),\n \t\t\t\t\tpb_url->file);\n msg:\n-\tboot_status(handler, status);\n+\tdevice_handler_boot_status(handler, status);\n \ttalloc_free(status);\n }\n \ndiff --git a/discover/device-handler.h b/discover/device-handler.h\nindex 12f5ce0..6b1a757 100644\n--- a/discover/device-handler.h\n+++ b/discover/device-handler.h\n@@ -4,6 +4,7 @@\n #include <stdbool.h>\n \n #include <list/list.h>\n+#include <types/types.h>\n \n struct device_handler;\n struct discover_device;\n@@ -96,6 +97,8 @@ int device_handler_conf(struct device_handler *handler,\n void device_handler_remove(struct device_handler *handler,\n \t\tstruct discover_device *device);\n \n+void device_handler_boot_status(void *arg, struct boot_status *status);\n+\n struct discover_context *device_handler_discover_context_create(\n \t\tstruct device_handler *handler,\n \t\tstruct discover_device *device);\n",
    "prefixes": [
        "1/3"
    ]
}