From patchwork Mon Aug 18 11:29:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 174 Return-Path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id D4A7EB376 for ; Mon, 18 Aug 2014 13:26:28 +0200 (CEST) Received: by mail-wg0-f51.google.com with SMTP id b13so4803139wgh.34 for ; Mon, 18 Aug 2014 04:29:51 -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:subject:date:message-id:in-reply-to :references; bh=/S67NW7rmx2Nj2iTrgQ57ishT/lWvruaGRjvmoQiqqU=; b=b2G7VgLwrjy8RvIi1DCwyuMfQ3zcQYYQ9UlZirW/uEKr9mBG+ajcAyYrZ5wD0MrdWL 8/rcVNhJ0n/T48nlyGe5S0G0m7N8XKUg5El5gltxj1qMyhggYKhCNYu0fnl0AyMH3W5c KkbwtVHIcluknShgdDcYfUMtAbVi4RfBLjlmHpwqCTB3QHhdPehWl5K+DzrzwcddpzAL R9Xhcnz0BNWVM3q0AIKXtU9n0Yf0hAQg+B/vIons+p9NC93hpvyIIUeuHCKM3ziSdBLS +aGXcjohmQP6m3C+m7uFtEHyuLCznaD4wkFaIilHYgrlZEqz5eJw+izNiWQsHMdZ4s8/ +56Q== X-Gm-Message-State: ALoCoQklK7dBDYnjFi3f5eYdV/OEu+1mrXlsNg+MDd6pd1Yo7hzv+o3K2jVBwTQGAu0Ku8PtEYTc X-Received: by 10.180.206.134 with SMTP id lo6mr68806534wic.1.1408361391547; Mon, 18 Aug 2014 04:29:51 -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 es9sm41617207wjd.1.2014.08.18.04.29.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Aug 2014 04:29:50 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 18 Aug 2014 13:29:24 +0200 Message-Id: <1408361365-12988-7-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1408361365-12988-1-git-send-email-david.marchand@6wind.com> References: <1408361365-12988-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v2 6/7] app/test: no more builtin commands 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, 18 Aug 2014 11:26:29 -0000 The builtin commands list is now empty, we can remove it. Signed-off-by: David Marchand --- app/test/commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test/commands.c b/app/test/commands.c index 0640ac9..b7c6ee0 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -324,9 +324,8 @@ cmdline_parse_ctx_t main_ctx[] = { int commands_init(void) { struct test_command *t; - char builtin_commands[] = ""; char *commands, *ptr; - int commands_len = strlen(builtin_commands) + 1; + int commands_len = 0; TAILQ_FOREACH(t, &commands_list, next) { commands_len += strlen(t->command) + 1; @@ -340,7 +339,8 @@ int commands_init(void) TAILQ_FOREACH(t, &commands_list, next) { ptr += sprintf(ptr, "%s#", t->command); } - ptr += sprintf(ptr, "%s", builtin_commands); + ptr--; + ptr[0] = '\0'; cmd_autotest_autotest.string_data.str = commands; return 0;