get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 75082,
    "url": "http://patches.dpdk.org/api/patches/75082/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200730210652.14568-4-dmitry.kozliuk@gmail.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200730210652.14568-4-dmitry.kozliuk@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200730210652.14568-4-dmitry.kozliuk@gmail.com",
    "date": "2020-07-30T21:06:47",
    "name": "[v2,3/7] cmdline: add internal wrappers for character input",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6f975ac5ef3d6bab0733df296a86445e2c22d3ad",
    "submitter": {
        "id": 1581,
        "url": "http://patches.dpdk.org/api/people/1581/?format=api",
        "name": "Dmitry Kozlyuk",
        "email": "dmitry.kozliuk@gmail.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200730210652.14568-4-dmitry.kozliuk@gmail.com/mbox/",
    "series": [
        {
            "id": 11426,
            "url": "http://patches.dpdk.org/api/series/11426/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11426",
            "date": "2020-07-30T21:06:44",
            "name": "cmdline: support Windows",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/11426/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/75082/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/75082/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id DDA96A052B;\n\tThu, 30 Jul 2020 23:07:50 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 462DA1C02E;\n\tThu, 30 Jul 2020 23:07:32 +0200 (CEST)",
            "from mail-lf1-f66.google.com (mail-lf1-f66.google.com\n [209.85.167.66]) by dpdk.org (Postfix) with ESMTP id 1463A4C93\n for <dev@dpdk.org>; Thu, 30 Jul 2020 23:07:26 +0200 (CEST)",
            "by mail-lf1-f66.google.com with SMTP id s9so15744188lfs.4\n for <dev@dpdk.org>; Thu, 30 Jul 2020 14:07:26 -0700 (PDT)",
            "from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru.\n [37.110.65.23])\n by smtp.gmail.com with ESMTPSA id y9sm1257763lji.49.2020.07.30.14.07.24\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 30 Jul 2020 14:07:24 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=9KBD5tDXCqm5NI+e5AeRBqTs67CJlCSTNrTUeRSPhGk=;\n b=ASNVWaHxEJN+A/4Jc5LAIlAXilIwrPJgq5wShK5MvjkB8i0qbZ0bzVbd0Hl6vl1pGw\n dhIBqs7ZNQ3+WOhdUfHsSk8JCZFRtXpaI2+VntjI4zbWupQYc+5UcePxUJOMuTN+OOYC\n s42LzeVvJvZpZy8T98CUQwDeWM3ZM2a1t1mL9N8AKQjcNuxXMjnMBTg/iG0OssCzVjmn\n RINPcRxi/FzAUNyG0rj86EJYEd0RECKgd8RRjbSg1oO/pqTkjQ3GnbufVskI5aNRmIG4\n r3DIPsxd666lOoSZqOkzxZyL8zME5FABkNMLPIi3ZWn9hhgB6sNXTMuD9JyTe1vJekEs\n azNQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=9KBD5tDXCqm5NI+e5AeRBqTs67CJlCSTNrTUeRSPhGk=;\n b=ByQQVBSwljh15fo8UUM8IaBNYlSRWaYb3Xk/fH6omVPqAXDEge4hQOtxWUePXN1jAF\n QSZSJqeM/drMjwevN+AYv13XkmmNhq26z7VN77y/DzX0oadapDHYhVxO7tUvbLhikBO1\n NUOFphCP15c1mm0cxePrtt7H+EHWVyHxLq6bNfw1qSBHkkU1kW1HpZ9xyVjTnT3vRy7S\n zyWRLxwbkm7wy06XPlb4HllruP+0oGW4g+BQqRfYeyR4Ofo3gz9CL6o3Jri1B0Y09Gk4\n 4TgVYxOofpvqK5oC+SawLaIqwhy6ogr2mmI0sxfJKc+FbF0Z5uujd047WniGMnYYuCPI\n +Rlg==",
        "X-Gm-Message-State": "AOAM532a0Yx0FFMBSys4Gns5Ns821gLvcCc5q+HjxxuDce2I698aehGS\n M/4yKDxGhEoflUcfZ0uVlyRYuTAHue69Gg==",
        "X-Google-Smtp-Source": "\n ABdhPJzwz0N7/NUzURv5frTuiNfqlaRRoJK+STTUS9gGTCbBophSNOFAzrrt43RYI8XxX9Bzbnl8tQ==",
        "X-Received": "by 2002:a05:6512:358c:: with SMTP id\n m12mr264324lfr.18.1596143245418;\n Thu, 30 Jul 2020 14:07:25 -0700 (PDT)",
        "From": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "Dmitry Malloy <dmitrym@microsoft.com>,\n Narcisa Ana Maria Vasile <Narcisa.Vasile@microsoft.com>,\n Fady Bader <fady@mellanox.com>, Tal Shnaiderman <talshn@mellanox.com>,\n \"Kadam, Pallavi\" <pallavi.kadam@intel.com>,\n Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Olivier Matz <olivier.matz@6wind.com>",
        "Date": "Fri, 31 Jul 2020 00:06:47 +0300",
        "Message-Id": "<20200730210652.14568-4-dmitry.kozliuk@gmail.com>",
        "X-Mailer": "git-send-email 2.25.4",
        "In-Reply-To": "<20200730210652.14568-1-dmitry.kozliuk@gmail.com>",
        "References": "<20200620210511.13134-1-dmitry.kozliuk@gmail.com>\n <20200730210652.14568-1-dmitry.kozliuk@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 3/7] cmdline: add internal wrappers for\n\tcharacter input",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "poll(3) is a purely Unix facility, so it cannot be directly used by\ncommon code. read(2) is limited in device support outside of Unix.\nCreate wrapper functions and implement them for Unix.\n\nSigned-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>\n---\n lib/librte_cmdline/cmdline.c         | 12 +++---------\n lib/librte_cmdline/cmdline_os_unix.c | 20 ++++++++++++++++++++\n lib/librte_cmdline/cmdline_private.h |  6 ++++++\n 3 files changed, 29 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c\nindex 6f3fdd598..a04719998 100644\n--- a/lib/librte_cmdline/cmdline.c\n+++ b/lib/librte_cmdline/cmdline.c\n@@ -11,7 +11,6 @@\n #include <stdarg.h>\n #include <inttypes.h>\n #include <fcntl.h>\n-#include <poll.h>\n #include <errno.h>\n #include <netinet/in.h>\n \n@@ -185,7 +184,6 @@ cmdline_quit(struct cmdline *cl)\n int\n cmdline_poll(struct cmdline *cl)\n {\n-\tstruct pollfd pfd;\n \tint status;\n \tssize_t read_status;\n \tchar c;\n@@ -195,16 +193,12 @@ cmdline_poll(struct cmdline *cl)\n \telse if (cl->rdl.status == RDLINE_EXITED)\n \t\treturn RDLINE_EXITED;\n \n-\tpfd.fd = cl->s_in;\n-\tpfd.events = POLLIN;\n-\tpfd.revents = 0;\n-\n-\tstatus = poll(&pfd, 1, 0);\n+\tstatus = cmdline_poll_char(cl);\n \tif (status < 0)\n \t\treturn status;\n \telse if (status > 0) {\n \t\tc = -1;\n-\t\tread_status = read(cl->s_in, &c, 1);\n+\t\tread_status = cmdline_read_char(cl, &c);\n \t\tif (read_status < 0)\n \t\t\treturn read_status;\n \n@@ -226,7 +220,7 @@ cmdline_interact(struct cmdline *cl)\n \n \tc = -1;\n \twhile (1) {\n-\t\tif (read(cl->s_in, &c, 1) <= 0)\n+\t\tif (cmdline_read_char(cl, &c) <= 0)\n \t\t\tbreak;\n \t\tif (cmdline_in(cl, &c, 1) < 0)\n \t\t\tbreak;\ndiff --git a/lib/librte_cmdline/cmdline_os_unix.c b/lib/librte_cmdline/cmdline_os_unix.c\nindex ca47bd19f..865a89ddd 100644\n--- a/lib/librte_cmdline/cmdline_os_unix.c\n+++ b/lib/librte_cmdline/cmdline_os_unix.c\n@@ -2,7 +2,9 @@\n  * Copyright (c) 2020 Dmitry Kozlyuk\n  */\n \n+#include <poll.h>\n #include <string.h>\n+#include <unistd.h>\n \n #include \"cmdline_private.h\"\n \n@@ -25,3 +27,21 @@ terminal_restore(const struct terminal *oldterm)\n {\n \ttcsetattr(fileno(stdin), TCSANOW, &oldterm->termios);\n }\n+\n+int\n+cmdline_poll_char(struct cmdline *cl)\n+{\n+\tstruct pollfd pfd;\n+\n+\tpfd.fd = cl->s_in;\n+\tpfd.events = POLLIN;\n+\tpfd.revents = 0;\n+\n+\treturn poll(&pfd, 1, 0);\n+}\n+\n+ssize_t\n+cmdline_read_char(struct cmdline *cl, char *c)\n+{\n+\treturn read(cl->s_in, c, 1);\n+}\ndiff --git a/lib/librte_cmdline/cmdline_private.h b/lib/librte_cmdline/cmdline_private.h\nindex adc552845..ecfeb89f6 100644\n--- a/lib/librte_cmdline/cmdline_private.h\n+++ b/lib/librte_cmdline/cmdline_private.h\n@@ -29,4 +29,10 @@ struct cmdline {\n \tstruct terminal oldterm;\n };\n \n+/* Check if a single character can be read from input. */\n+int cmdline_poll_char(struct cmdline *cl);\n+\n+/* Read one character from input. */\n+ssize_t cmdline_read_char(struct cmdline *cl, char *c);\n+\n #endif\n",
    "prefixes": [
        "v2",
        "3/7"
    ]
}