From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 066437F0C for ; Fri, 21 Nov 2014 10:08:24 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 21 Nov 2014 01:18:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="419725123" Received: from slahti-mobl1.ger.corp.intel.com ([10.252.20.10]) by FMSMGA003.fm.intel.com with SMTP; 21 Nov 2014 01:08:39 -0800 Received: by (sSMTP sendmail emulation); Fri, 21 Nov 2014 09:18:08 +0025 Date: Fri, 21 Nov 2014 09:18:08 +0000 From: Bruce Richardson To: Sergio Gonzalez Monroy Message-ID: <20141121091808.GA2488@bricha3-MOBL3> 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> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) 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: Fri, 21 Nov 2014 09:08:25 -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 Acked-by: Bruce Richardson > --- > 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 >