get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 804721,
    "url": "http://patchwork.ozlabs.org/api/patches/804721/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/petitboot/patch/20170823013911.15052-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": "<20170823013911.15052-1-sam@mendozajonas.com>",
    "list_archive_url": null,
    "date": "2017-08-23T01:39:11",
    "name": "discover/device-handler: Disable safe mode warning on reinit",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9a9fe39c69e7154b8b6fa3a07fe1107e7cef6dd2",
    "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/20170823013911.15052-1-sam@mendozajonas.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/804721/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/804721/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 [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xcVTV1lYJz9sNd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 23 Aug 2017 11:39:26 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xcVTT6jlCzDqkd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 23 Aug 2017 11:39:25 +1000 (AEST)",
            "from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com\n\t[66.111.4.25])\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 3xcVTM1XDYzDqTr\n\tfor <petitboot@lists.ozlabs.org>;\n\tWed, 23 Aug 2017 11:39:19 +1000 (AEST)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n\tby mailout.nyi.internal (Postfix) with ESMTP id 13A5121395;\n\tTue, 22 Aug 2017 21:39:17 -0400 (EDT)",
            "from frontend1 ([10.202.2.160])\n\tby compute2.internal (MEProxy); Tue, 22 Aug 2017 21:39:17 -0400",
            "from v4.ozlabs.ibm.com (unknown [122.99.82.10])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id D74967E41E;\n\tTue, 22 Aug 2017 21:39:15 -0400 (EDT)"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=mendozajonas.com header.i=@mendozajonas.com\n\theader.b=\"Bg5H0kLq\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"FPpR46AT\"; \n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=mendozajonas.com header.i=@mendozajonas.com\n\theader.b=\"Bg5H0kLq\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"FPpR46AT\"; \n\tdkim-atps=neutral",
            "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=mendozajonas.com header.i=@mendozajonas.com\n\theader.b=\"Bg5H0kLq\"; dkim=pass (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com\n\theader.b=\"FPpR46AT\"; dkim-atps=neutral"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmendozajonas.com; h=cc:date:from:message-id:subject:to\n\t:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=zFFWCB\n\tWUnGJnDW97oryIv85Ypb48hoxlDXbbkYTJhWM=; b=Bg5H0kLqUFy9AGIpXMW2HS\n\taSngeDQlyHMamzZVWZj7dYmz4IubwVUlzZem7shEdlHCS9Bzz3hvRTMbxd8WvVWj\n\tfqK2eS50eJtMW3YBbjGiWmuCmz3KX+OHO9U9GHkEFwvAuGHUolQ5jK9YvgklZdTv\n\tKQ8Ko0m2lwPQyekRU1rkqBfzzmC6FsRsJ3HBuH2JfTKBGlK0+fAHWuP+wXwYi4pj\n\tNqUOlbyVK1XHSUYoF4oOmzgZiB5rseSBypfPiahbhiRsaGdo+dD1rz3fn1VAhX1R\n\tcV/my/g1v8NWnU78l2NIjN7TP7aWDkPbhAmA7gmb8e0OtbAYT7wyvGmfMjZbX43A\n\t==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:date:from:message-id:subject:to\n\t:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=zFFWCB\n\tWUnGJnDW97oryIv85Ypb48hoxlDXbbkYTJhWM=; b=FPpR46ATmZm9kEenDWp9Dw\n\t0/33KF0nuSCWMqE2zJ59v5WrHzwtZ5x6X3ScP9y+Cp2crjVjg+wBFIBhTlGVqtY6\n\t36lqEbvBIvvwL57slKfsumnvuwgKb04bwRAQL7+I1dVlkDzPkoUDeHQr5nx0CZ+q\n\tsVlhEOetNlY87dM+RkBAqR8/PuLVpinyRNtDUTr3B2OSepXh+0b3B2f3X5gNhKFu\n\tyd71bZcjsXnDT4JzxhYr5p7qG/1xwh0gJcqszaaW5X+QaDchEmVJwDc90E1pCSBG\n\tkgc1AcbQEOCoBr5NKbhTEc9iuQrf5c+ybY1s8fUENw59In6nvMf75jn1z2PltO4w\n\t=="
        ],
        "X-ME-Sender": "<xms:xdycWcMp-6NZoQpM25b_d3WkSkSTCBlSeyzjgbTTKc8-WD_3z9EEEA>",
        "X-Sasl-enc": "gGBXNu65h5WlcbkYByvTuGDut9Pcxgs0lv42PjV+W+T6 1503452356",
        "From": "Samuel Mendoza-Jonas <sam@mendozajonas.com>",
        "To": "petitboot@lists.ozlabs.org",
        "Subject": "[PATCH] discover/device-handler: Disable safe mode warning on reinit",
        "Date": "Wed, 23 Aug 2017 11:39:11 +1000",
        "Message-Id": "<20170823013911.15052-1-sam@mendozajonas.com>",
        "X-Mailer": "git-send-email 2.14.0",
        "X-BeenThere": "petitboot@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "Cc": "Samuel Mendoza-Jonas <sam@mendozajonas.com>",
        "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": "If a user pressed \"Rescan Devices\" in safe mode the reinit would\ncomplete successfully, but the big warning that safe mode is active\nwould remain. On reinit clear the safe_mode flag properly.\n\nThis has no functional change aside from clearing the UI warning - the\nIPMI override remains active until cleared or a successful boot occurs.\n\nSigned-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>\n---\n discover/device-handler.c | 10 ++++++++++\n 1 file changed, 10 insertions(+)",
    "diff": "diff --git a/discover/device-handler.c b/discover/device-handler.c\nindex ce3fc46..4e1b3ca 100644\n--- a/discover/device-handler.c\n+++ b/discover/device-handler.c\n@@ -18,6 +18,7 @@\n #include <process/process.h>\n #include <url/url.h>\n #include <i18n/i18n.h>\n+#include <pb-config/pb-config.h>\n \n #include <sys/sysmacros.h>\n #include <sys/types.h>\n@@ -393,6 +394,7 @@ void device_handler_reinit(struct device_handler *handler)\n {\n \tstruct discover_boot_option *opt, *tmp;\n \tstruct ramdisk_device *ramdisk;\n+\tstruct config *config;\n \tunsigned int i;\n \n \tdevice_handler_cancel_default(handler);\n@@ -440,6 +442,14 @@ void device_handler_reinit(struct device_handler *handler)\n \n \tset_env_variables(config_get());\n \n+\t/* If the safe mode warning was active disable it now */\n+\tif (config_get()->safe_mode) {\n+\t\tconfig = config_copy(handler, config_get());\n+\t\tconfig->safe_mode = false;\n+\t\tconfig_set(config);\n+\t\tdiscover_server_notify_config(handler->server, config);\n+\t}\n+\n \tdevice_handler_reinit_sources(handler);\n }\n \n",
    "prefixes": []
}