From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by dpdk.org (Postfix) with ESMTP id EEFD5AFCA for ; Mon, 22 Sep 2014 10:32:06 +0200 (CEST) Received: by mail-wi0-f170.google.com with SMTP id fb4so2371436wid.3 for ; Mon, 22 Sep 2014 01:38:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6VgVTaT3Xv45kXWrLAUBCuBXPHlPOWnKB+5H++pTG1U=; b=Kp98aUu0kIRg3tOpHJQuyiGjj5FQ/y9MDladtQJTKwy1VFbPoZiH22k+s08HkXNCFa SFDOvxArZwfsMwi3crNpPgBgHETW12EBpeV+xdBhqT9+csoLgDim85mVBlsbByuSHNWJ lw9EF/EP2raQysnyrsIlGl5thCvNjpZzlYMkBHnYuCR9QUgvEQn6fuevqSgfFMLK7ttJ oRGZiOXc95BvJIDhc6ia/s7eIzAxVPUJ/CeYlSgL0a8qnjk7NuKq7yr+dZzHKuts1SN4 SP8N8VXEUtw0UVJNrABC8qDNZc8LfPWjH5EN036ZI+vbaTm0Gb8WCxhWrcV96KqXz6gk WeZQ== X-Gm-Message-State: ALoCoQnUfud1oyVKfVFpMEBMg5GHibJzqfi65R6mYRJJlXNXuHBmu2htCWxdxZDSPBbfnK41nm6l X-Received: by 10.180.72.211 with SMTP id f19mr7564457wiv.39.1411375090022; Mon, 22 Sep 2014 01:38:10 -0700 (PDT) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id js2sm11522334wjc.9.2014.09.22.01.38.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Sep 2014 01:38:09 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 22 Sep 2014 10:37:56 +0200 Message-Id: <1411375081-27986-3-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1411375081-27986-1-git-send-email-david.marchand@6wind.com> References: <1411375081-27986-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH 2/7] eal: factorise unsupported option handling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2014 08:32:07 -0000 Signed-off-by: David Marchand --- lib/librte_eal/bsdapp/eal/eal.c | 21 ++++++--------------- lib/librte_eal/linuxapp/eal/eal.c | 6 ++++++ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index ffdc441..7e9f3aa 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -626,24 +626,9 @@ eal_parse_args(int argc, char **argv) else if (!strcmp(lgopts[option_index].name, OPT_NO_SHCONF)) { internal_config.no_shconf = 1; } - else if (!strcmp(lgopts[option_index].name, OPT_HUGE_DIR)) { - RTE_LOG(ERR, EAL, "Option "OPT_HUGE_DIR" is not supported on" - "FreeBSD\n"); - return -1; - } else if (!strcmp(lgopts[option_index].name, OPT_PROC_TYPE)) { internal_config.process_type = eal_parse_proc_type(optarg); } - else if (!strcmp(lgopts[option_index].name, OPT_FILE_PREFIX)) { - RTE_LOG(ERR, EAL, "Option "OPT_FILE_PREFIX" is not supported on" - "FreeBSD\n"); - return -1; - } - else if (!strcmp(lgopts[option_index].name, OPT_SOCKET_MEM)) { - RTE_LOG(ERR, EAL, "Option "OPT_SOCKET_MEM" is not supported on" - "FreeBSD\n"); - return -1; - } else if (!strcmp(lgopts[option_index].name, OPT_PCI_BLACKLIST)) { if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI, optarg) < 0) { @@ -684,6 +669,12 @@ eal_parse_args(int argc, char **argv) return -1; } internal_config.log_level = log; + } else { + RTE_LOG(ERR, EAL, "Option %s is not supported " + "on FreeBSD\n", + lgopts[option_index].name); + eal_usage(prgname); + return -1; } break; diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 633e3b8..bf63744 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -938,6 +938,12 @@ eal_parse_args(int argc, char **argv) } else if (!strcmp(lgopts[option_index].name, OPT_CREATE_UIO_DEV)) { internal_config.create_uio_dev = 1; + } else { + RTE_LOG(ERR, EAL, "Option %s is not supported " + "on Linux\n", + lgopts[option_index].name); + eal_usage(prgname); + return -1; } break; -- 1.7.10.4