get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 3236,
    "url": "http://patches.dpdk.org/api/patches/3236/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1423759677-32152-3-git-send-email-thomas.monjalon@6wind.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": "<1423759677-32152-3-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1423759677-32152-3-git-send-email-thomas.monjalon@6wind.com",
    "date": "2015-02-12T16:47:57",
    "name": "[dpdk-dev,v3,2/2] eal: add help option",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3900bdf5297749f8cb4e7631b293f30ebabfd189",
    "submitter": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1423759677-32152-3-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/3236/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/3236/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 480E5B3D5;\n\tThu, 12 Feb 2015 17:48:40 +0100 (CET)",
            "from mail-wi0-f181.google.com (mail-wi0-f181.google.com\n\t[209.85.212.181]) by dpdk.org (Postfix) with ESMTP id A286AADF9\n\tfor <dev@dpdk.org>; Thu, 12 Feb 2015 17:48:37 +0100 (CET)",
            "by mail-wi0-f181.google.com with SMTP id r20so5863695wiv.2\n\tfor <dev@dpdk.org>; Thu, 12 Feb 2015 08:48:37 -0800 (PST)",
            "from localhost.localdomain (136-92-190-109.dsl.ovh.fr.\n\t[109.190.92.136]) by mx.google.com with ESMTPSA id\n\thn2sm6417959wjc.5.2015.02.12.08.48.36\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 12 Feb 2015 08:48:36 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=u12GRulB4jsbG+ewIUjUZ7kVx2PCynaU8dVKiOb56OA=;\n\tb=c5Uf3tivo+DswgKEzJMCKGb4MRJEg5Jlm+079Q6i7NERAHl3b9XB2l+MwJeaCIH8GO\n\tyKisFnWh+rTLS6X5TinKZTe0zKDaY8HqsfpWU4qSPCcgyZCTeV8KasPA5gQxgmrdSHTE\n\thNssks7ddQhdJCtoj8Dc8zh5wqNs6lmjASOrDybyjLy3ONBCO0qa5iD941OxIR2lWLNe\n\t0cqZDs3v5NlsCWnZ335oPJUTEenVzd2ges1AeUV7nBvGOwRTqUhsCqt8mO10fFW8K5wU\n\teVEduZcD0SvSRc9VnE0QbE7PU8mxKb9szbTb/UTg1Eo5boMe4611PMbjzoyT0hQk2fhx\n\t6ddQ==",
        "X-Gm-Message-State": "ALoCoQlhYPYnYgZWjDjohDOWX5nVRMcxCVDtVC2kpMJ1okKuvrX8bEbceaffOhUdebSVbLR9w024",
        "X-Received": "by 10.194.190.10 with SMTP id gm10mr9443552wjc.91.1423759717563; \n\tThu, 12 Feb 2015 08:48:37 -0800 (PST)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 12 Feb 2015 17:47:57 +0100",
        "Message-Id": "<1423759677-32152-3-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.2.2",
        "In-Reply-To": "<1423759677-32152-1-git-send-email-thomas.monjalon@6wind.com>",
        "References": "<1422899093-20207-1-git-send-email-thomas.monjalon@6wind.com>\n\t<1423759677-32152-1-git-send-email-thomas.monjalon@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v3 2/2] eal: add help option",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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": "Help is printed with -h or --help.\n\nHelp is also printed for an unknown option.\nThis was broken since the rework of options.\n\nFixes: 489a9d6c9f77 (\"merge bsd and linux common options parsing\")\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\nAcked-by: David Marchand <david.marchand@6wind.com>\n---\n lib/librte_eal/bsdapp/eal/eal.c            | 7 ++++++-\n lib/librte_eal/common/eal_common_options.c | 3 +++\n lib/librte_eal/common/eal_options.h        | 2 ++\n lib/librte_eal/linuxapp/eal/eal.c          | 8 +++++++-\n 4 files changed, 18 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c\nindex 69f3c03..ca2f445 100644\n--- a/lib/librte_eal/bsdapp/eal/eal.c\n+++ b/lib/librte_eal/bsdapp/eal/eal.c\n@@ -326,8 +326,10 @@ eal_parse_args(int argc, char **argv)\n \t\tint ret;\n \n \t\t/* getopt is not happy, stop right now */\n-\t\tif (opt == '?')\n+\t\tif (opt == '?') {\n+\t\t\teal_usage(prgname);\n \t\t\treturn -1;\n+\t\t}\n \n \t\tret = eal_parse_common_option(opt, optarg, &internal_config);\n \t\t/* common parser is not happy */\n@@ -340,6 +342,9 @@ eal_parse_args(int argc, char **argv)\n \t\t\tcontinue;\n \n \t\tswitch (opt) {\n+\t\tcase 'h':\n+\t\t\teal_usage(prgname);\n+\t\t\texit(EXIT_SUCCESS);\n \t\tdefault:\n \t\t\tif (opt < OPT_LONG_MIN_NUM && isprint(opt)) {\n \t\t\t\tRTE_LOG(ERR, EAL, \"Option %c is not supported \"\ndiff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 3dda237..4314e4e 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -57,6 +57,7 @@ eal_short_options[] =\n \t\"b:\" /* pci-blacklist */\n \t\"c:\" /* coremask */\n \t\"d:\" /* driver */\n+\t\"h\"  /* help */\n \t\"l:\" /* corelist */\n \t\"m:\" /* memory size */\n \t\"n:\" /* memory channels */\n@@ -70,6 +71,7 @@ eal_long_options[] = {\n \t{OPT_BASE_VIRTADDR,     1, NULL, OPT_BASE_VIRTADDR_NUM    },\n \t{OPT_CREATE_UIO_DEV,    1, NULL, OPT_CREATE_UIO_DEV_NUM   },\n \t{OPT_FILE_PREFIX,       1, NULL, OPT_FILE_PREFIX_NUM      },\n+\t{OPT_HELP,              0, NULL, OPT_HELP_NUM             },\n \t{OPT_HUGE_DIR,          1, NULL, OPT_HUGE_DIR_NUM         },\n \t{OPT_LOG_LEVEL,         1, NULL, OPT_LOG_LEVEL_NUM        },\n \t{OPT_MASTER_LCORE,      1, NULL, OPT_MASTER_LCORE_NUM     },\n@@ -605,6 +607,7 @@ eal_common_usage(void)\n \t       \"  --\"OPT_SYSLOG\"            Set syslog facility\\n\"\n \t       \"  --\"OPT_LOG_LEVEL\"         Set default log level\\n\"\n \t       \"  -v                  Display version information on startup\\n\"\n+\t       \"  -h, --help          This help\\n\"\n \t       \"\\nEAL options for DEBUG use only:\\n\"\n \t       \"  --\"OPT_NO_HUGE\"           Use malloc instead of hugetlbfs\\n\"\n \t       \"  --\"OPT_NO_PCI\"            Disable PCI\\n\"\ndiff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h\nindex fe1c85d..d199a00 100644\n--- a/lib/librte_eal/common/eal_options.h\n+++ b/lib/librte_eal/common/eal_options.h\n@@ -35,6 +35,8 @@\n \n enum {\n \t/* long options mapped to a short option */\n+#define OPT_HELP              \"help\"\n+\tOPT_HELP_NUM            = 'h',\n #define OPT_PCI_BLACKLIST     \"pci-blacklist\"\n \tOPT_PCI_BLACKLIST_NUM   = 'b',\n #define OPT_PCI_WHITELIST     \"pci-whitelist\"\ndiff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c\nindex e3955e7..d8c0628 100644\n--- a/lib/librte_eal/linuxapp/eal/eal.c\n+++ b/lib/librte_eal/linuxapp/eal/eal.c\n@@ -520,8 +520,10 @@ eal_parse_args(int argc, char **argv)\n \t\tint ret;\n \n \t\t/* getopt is not happy, stop right now */\n-\t\tif (opt == '?')\n+\t\tif (opt == '?') {\n+\t\t\teal_usage(prgname);\n \t\t\treturn -1;\n+\t\t}\n \n \t\tret = eal_parse_common_option(opt, optarg, &internal_config);\n \t\t/* common parser is not happy */\n@@ -534,6 +536,10 @@ eal_parse_args(int argc, char **argv)\n \t\t\tcontinue;\n \n \t\tswitch (opt) {\n+\t\tcase 'h':\n+\t\t\teal_usage(prgname);\n+\t\t\texit(EXIT_SUCCESS);\n+\n \t\t/* force loading of external driver */\n \t\tcase 'd':\n \t\t\tsolib = malloc(sizeof(*solib));\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "2/2"
    ]
}