Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2920/?format=api
http://patches.dpdk.org/api/patches/2920/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1422899093-20207-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": "<1422899093-20207-3-git-send-email-thomas.monjalon@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1422899093-20207-3-git-send-email-thomas.monjalon@6wind.com", "date": "2015-02-02T17:44:53", "name": "[dpdk-dev,v2,2/2] eal: add help option", "commit_ref": null, "pull_url": null, "state": "superseded", "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/1422899093-20207-3-git-send-email-thomas.monjalon@6wind.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/2920/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/2920/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 65F7E37B8;\n\tMon, 2 Feb 2015 22:50:35 +0100 (CET)", "from mail-wi0-f171.google.com (mail-wi0-f171.google.com\n\t[209.85.212.171]) by dpdk.org (Postfix) with ESMTP id 19BAF37B7\n\tfor <dev@dpdk.org>; Mon, 2 Feb 2015 22:50:34 +0100 (CET)", "by mail-wi0-f171.google.com with SMTP id l15so20017153wiw.4\n\tfor <dev@dpdk.org>; Mon, 02 Feb 2015 13:50:34 -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\ta20sm20813428wic.16.2015.02.02.09.45.28 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 02 Feb 2015 09:45:29 -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=Zh8Zestxc/BUnRqnBdFXDDx3j41PpqFmvQno0BHw1tg=;\n\tb=QDxlj//v1RJTVAnzWbTisif2a5P2VTOXP22iswq2btoOeOfFSoxaSIQNkEwBWDvpQS\n\tT2DKEyMYHMxmzi8XpBnir8Bs9oJM2xbh6VnExybmq1rBkmLVD5SvsOUwUfF2SpuNWbLa\n\tC0BNFCT/hHWmPy/FisiuA6HVNTm96lKxXFgO87EgkdyL6c3js5+5R5ixplMjY0HG3jy3\n\tm9AmWXNiFA0kKLpQIRj4EkN3v5fq1dQqLIpJBpvXykCiNcs1mxaw/zVs1ALB+rk+KFbM\n\t8AeLFp6O+8N+DSepotoAVdbMDTZk7ZeznAYYi7W60KnhRMORZEon6g2vjm/HrgK5UTkO\n\tHDqg==", "X-Gm-Message-State": "ALoCoQmmopOdkGLUIderwCj43MEzuXStIDNrD0EWdfCoVuMdwMRUqfl4daatcbir7V2zEJcNIb8O", "X-Received": "by 10.194.81.193 with SMTP id c1mr44978549wjy.11.1422899129942; \n\tMon, 02 Feb 2015 09:45:29 -0800 (PST)", "From": "Thomas Monjalon <thomas.monjalon@6wind.com>", "To": "dev@dpdk.org", "Date": "Mon, 2 Feb 2015 18:44:53 +0100", "Message-Id": "<1422899093-20207-3-git-send-email-thomas.monjalon@6wind.com>", "X-Mailer": "git-send-email 2.2.2", "In-Reply-To": "<1422899093-20207-1-git-send-email-thomas.monjalon@6wind.com>", "References": "<1422554832-30093-1-git-send-email-thomas.monjalon@6wind.com>\n\t<1422899093-20207-1-git-send-email-thomas.monjalon@6wind.com>", "Subject": "[dpdk-dev] [PATCH v2 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 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", "v2", "2/2" ] }{ "id": 2920, "url": "