Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2757/?format=api
https://patches.dpdk.org/api/patches/2757/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1422554832-30093-3-git-send-email-thomas.monjalon@6wind.com/", "project": { "id": 1, "url": "https://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": "<1422554832-30093-3-git-send-email-thomas.monjalon@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1422554832-30093-3-git-send-email-thomas.monjalon@6wind.com", "date": "2015-01-29T18:07:12", "name": "[dpdk-dev,2/2] eal: add help option", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "90b225967574661d3b9e91da9db66908da8b6ee7", "submitter": { "id": 1, "url": "https://patches.dpdk.org/api/people/1/?format=api", "name": "Thomas Monjalon", "email": "thomas.monjalon@6wind.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1422554832-30093-3-git-send-email-thomas.monjalon@6wind.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/2757/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/2757/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 5BA035A97;\n\tThu, 29 Jan 2015 19:07:56 +0100 (CET)", "from mail-wi0-f177.google.com (mail-wi0-f177.google.com\n\t[209.85.212.177]) by dpdk.org (Postfix) with ESMTP id D609F5A85\n\tfor <dev@dpdk.org>; Thu, 29 Jan 2015 19:07:53 +0100 (CET)", "by mail-wi0-f177.google.com with SMTP id r20so28030829wiv.4\n\tfor <dev@dpdk.org>; Thu, 29 Jan 2015 10:07:53 -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\thr1sm3468205wib.1.2015.01.29.10.07.52 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 29 Jan 2015 10:07:52 -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:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=ndUwXXO+zAud2Ut0QG0KpRGGvD+ldQxds7ANgFbgVXg=;\n\tb=PYWS5k59BsBLLLM4S4fpRAMsXh8EtiobNQzLqWQxg/Jfje4jSL3QU+M0cZ5BcbIzRo\n\t6HixM7lTijJmRm6GbYZIbbtjwnDcUCPI8joPYf8F0niubeLHmrYiKExSk5jBYGSr6EN1\n\tYsYkryTxVzDX1aL92sQyRtjR4gH4HAP0JB40UVB4e81muFwY317+gv4YPqE5fylBi24b\n\tLmjJKVBj8CoUE2NYtGdiVK/q2bLJlhRKiIWazkGjtgWBfKjV4NMekhYs7+qLhsozA55/\n\txkg4wBLkXJmOctLKEYbO7cQcqVSOSYyxfWfjI3MumpMjihJA18bWK77Od4C//op1piXQ\n\tZ+1Q==", "X-Gm-Message-State": "ALoCoQky2uLDZMdWdAgop3h/r1W4TAHPLhejANCjs6i8qaOCNPB+QVVo+yJ/+FwYOtSzVPVFlU1q", "X-Received": "by 10.180.104.100 with SMTP id gd4mr2602553wib.22.1422554873397; \n\tThu, 29 Jan 2015 10:07:53 -0800 (PST)", "From": "Thomas Monjalon <thomas.monjalon@6wind.com>", "To": "dev@dpdk.org", "Date": "Thu, 29 Jan 2015 19:07:12 +0100", "Message-Id": "<1422554832-30093-3-git-send-email-thomas.monjalon@6wind.com>", "X-Mailer": "git-send-email 2.2.2", "In-Reply-To": "<1422554832-30093-1-git-send-email-thomas.monjalon@6wind.com>", "References": "<1422554832-30093-1-git-send-email-thomas.monjalon@6wind.com>", "Subject": "[dpdk-dev] [PATCH 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>\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 4890e78..05d80bd 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 e476f8d..9536468 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_WHITELIST \"pci-whitelist\"\n \tOPT_PCI_WHITELIST_NUM = 'w',\n #define OPT_PCI_BLACKLIST \"pci-blacklist\"\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", "2/2" ] }{ "id": 2757, "url": "