get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 23837,
    "url": "http://patches.dpdk.org/api/patches/23837/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1493089885-94889-1-git-send-email-wenzhuo.lu@intel.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": "<1493089885-94889-1-git-send-email-wenzhuo.lu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1493089885-94889-1-git-send-email-wenzhuo.lu@intel.com",
    "date": "2017-04-25T03:11:25",
    "name": "[dpdk-dev] lib/librte_cmdline: fix CLI parsing issue",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "54322baaaef12fe1a64f732eed963f24ae0ea2c9",
    "submitter": {
        "id": 258,
        "url": "http://patches.dpdk.org/api/people/258/?format=api",
        "name": "Wenzhuo Lu",
        "email": "wenzhuo.lu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1493089885-94889-1-git-send-email-wenzhuo.lu@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/23837/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/23837/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id E8AA02C16;\n\tTue, 25 Apr 2017 05:11:04 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id E28B62BF5;\n\tTue, 25 Apr 2017 05:11:03 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Apr 2017 20:11:02 -0700",
            "from dpdk26.sh.intel.com ([10.239.128.228])\n\tby fmsmga001.fm.intel.com with ESMTP; 24 Apr 2017 20:11:01 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.37,247,1488873600\"; d=\"scan'208\";\n\ta=\"1139719041\"",
        "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "olivier.matz@6wind.com, Wenzhuo Lu <wenzhuo.lu@intel.com>,\n\tstable@dpdk.org",
        "Date": "Tue, 25 Apr 2017 11:11:25 +0800",
        "Message-Id": "<1493089885-94889-1-git-send-email-wenzhuo.lu@intel.com>",
        "X-Mailer": "git-send-email 1.9.3",
        "Subject": "[dpdk-dev] [PATCH] lib/librte_cmdline: fix CLI parsing issue",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When parsing a CLI, all the CLI instances are checked\none by one. Even if an instance already matches the CLI,\nthe parsing will not stop for ambiguous check.\nThe problem is that the following check may change the\nparsing result of the previous one even if the following\ninstance doesn't match.\n\nUse a temporary validate for the parsing result when\ntrying to match an instance and only store the result\nwhen it matches, so the previous result has no chance\nto be changed.\n\nFixes: af75078fece3 (\"first public release\")\nCC: stable@dpdk.org\n\nSigned-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>\n---\n lib/librte_cmdline/cmdline_parse.c | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/librte_cmdline/cmdline_parse.c b/lib/librte_cmdline/cmdline_parse.c\nindex 763c286..b814880 100644\n--- a/lib/librte_cmdline/cmdline_parse.c\n+++ b/lib/librte_cmdline/cmdline_parse.c\n@@ -258,7 +258,7 @@\n \tunion {\n \t\tchar buf[CMDLINE_PARSE_RESULT_BUFSIZE];\n \t\tlong double align; /* strong alignment constraint for buf */\n-\t} result;\n+\t} result, tmp_result;\n \tcmdline_parse_token_hdr_t *dyn_tokens[CMDLINE_PARSE_DYNAMIC_TOKENS];\n \tvoid (*f)(void *, struct cmdline *, void *) = NULL;\n \tvoid *data = NULL;\n@@ -321,14 +321,16 @@\n \t\tdebug_printf(\"INST %d\\n\", inst_num);\n \n \t\t/* fully parsed */\n-\t\ttok = match_inst(inst, buf, 0, result.buf, sizeof(result.buf),\n-\t\t\t\t &dyn_tokens);\n+\t\ttok = match_inst(inst, buf, 0, tmp_result.buf,\n+\t\t\t\t sizeof(tmp_result.buf), &dyn_tokens);\n \n \t\tif (tok > 0) /* we matched at least one token */\n \t\t\terr = CMDLINE_PARSE_BAD_ARGS;\n \n \t\telse if (!tok) {\n \t\t\tdebug_printf(\"INST fully parsed\\n\");\n+\t\t\tmemcpy(&result, &tmp_result,\n+\t\t\t       sizeof(result));\n \t\t\t/* skip spaces */\n \t\t\twhile (isblank2(*curbuf)) {\n \t\t\t\tcurbuf++;\n",
    "prefixes": [
        "dpdk-dev"
    ]
}