From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id F3F027F0C for ; Thu, 20 Nov 2014 15:10:16 +0100 (CET) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1XrSbB-0004T0-7J; Thu, 20 Nov 2014 09:20:43 -0500 Date: Thu, 20 Nov 2014 09:20:40 -0500 From: Neil Horman To: Sergio Gonzalez Monroy Message-ID: <20141120142040.GE2609@hmsreliant.think-freely.org> References: <1416493033-13450-1-git-send-email-sergio.gonzalez.monroy@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1416493033-13450-1-git-send-email-sergio.gonzalez.monroy@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] cmdline: Fix broken functionality in FreeBSD 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: Thu, 20 Nov 2014 14:10:17 -0000 On Thu, Nov 20, 2014 at 02:17:13PM +0000, Sergio Gonzalez Monroy wrote: > Some features of the cmdline were broken in FreeBSD as a result of > termios not being compiled. > > Signed-off-by: Sergio Gonzalez Monroy Not sure I understand the changelog above. You're removing ifdefs below which makes sense, but are you now assuming that BSD will be built with termios support, or do you need to add some alternate dependency check during the configuration of DPDK? Neil > --- > lib/librte_cmdline/cmdline.h | 2 -- > lib/librte_cmdline/cmdline_socket.c | 10 +--------- > 2 files changed, 1 insertion(+), 11 deletions(-) > > diff --git a/lib/librte_cmdline/cmdline.h b/lib/librte_cmdline/cmdline.h > index 4c28d37..06ae086 100644 > --- a/lib/librte_cmdline/cmdline.h > +++ b/lib/librte_cmdline/cmdline.h > @@ -71,9 +71,7 @@ struct cmdline { > cmdline_parse_ctx_t *ctx; > struct rdline rdl; > char prompt[RDLINE_PROMPT_SIZE]; > -#ifdef RTE_EXEC_ENV_LINUXAPP > struct termios oldterm; > -#endif > }; > > struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out); > diff --git a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c > index b51b537..6820b6d 100644 > --- a/lib/librte_cmdline/cmdline_socket.c > +++ b/lib/librte_cmdline/cmdline_socket.c > @@ -93,7 +93,6 @@ struct cmdline * > cmdline_stdin_new(cmdline_parse_ctx_t *ctx, const char *prompt) > { > struct cmdline *cl; > -#ifdef RTE_EXEC_ENV_LINUXAPP > struct termios oldterm, term; > > tcgetattr(0, &oldterm); > @@ -101,14 +100,12 @@ cmdline_stdin_new(cmdline_parse_ctx_t *ctx, const char *prompt) > term.c_lflag &= ~(ICANON | ECHO | ISIG); > tcsetattr(0, TCSANOW, &term); > setbuf(stdin, NULL); > -#endif > > cl = cmdline_new(ctx, prompt, 0, 1); > > -#ifdef RTE_EXEC_ENV_LINUXAPP > if (cl) > memcpy(&cl->oldterm, &oldterm, sizeof(term)); > -#endif > + > return cl; > } > > @@ -118,10 +115,5 @@ cmdline_stdin_exit(struct cmdline *cl) > if (!cl) > return; > > -#ifdef RTE_EXEC_ENV_LINUXAPP > tcsetattr(fileno(stdin), TCSANOW, &cl->oldterm); > -#else > - /* silent the compiler */ > - (void)cl; > -#endif > } > -- > 2.1.0 > >