From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E855456A1 for ; Mon, 11 Dec 2017 13:29:51 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2017 04:29:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,391,1508828400"; d="scan'208";a="185938645" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.237.220.117]) ([10.237.220.117]) by fmsmga006.fm.intel.com with ESMTP; 11 Dec 2017 04:29:48 -0800 To: Xueming Li , Olivier Matz , Jingjing Wu Cc: dev@dpdk.org References: <20171115154545.8936-1-xuemingl@mellanox.com> <20171115154545.8936-2-xuemingl@mellanox.com> From: "Burakov, Anatoly" Message-ID: <4695dadb-c6e7-9510-2d94-113ee9925c6b@intel.com> Date: Mon, 11 Dec 2017 12:29:47 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171115154545.8936-2-xuemingl@mellanox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/3] lib/cmdline: add echo support in batch loading from file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 12:29:52 -0000 On 15-Nov-17 3:45 PM, Xueming Li wrote: > Add echo option to echo commandline to screen when running loaded > scripts from file. > > Signed-off-by: Xueming Li > --- <...snip...> > @@ -86,7 +87,7 @@ cmdline_file_new(cmdline_parse_ctx_t *ctx, const char *prompt, const char *path) > dprintf("open() failed\n"); > return NULL; > } > - return cmdline_new(ctx, prompt, fd, -1); > + return cmdline_new(ctx, prompt, fd, echo ? 1 : -1); This should probably be "echo ? STDOUT_FILENO : -1", to make the intention clearer. > -- Thanks, Anatoly