From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6A19C6946 for ; Fri, 23 May 2014 17:21:29 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 23 May 2014 08:21:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,894,1392192000"; d="scan'208";a="543974738" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 23 May 2014 08:21:37 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s4NFLaBG006340; Fri, 23 May 2014 16:21:36 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id s4NFLaJS002451; Fri, 23 May 2014 16:21:36 +0100 Received: (from cfdumitr@localhost) by sivswdev01.ir.intel.com with id s4NFLab5002447; Fri, 23 May 2014 16:21:36 +0100 From: Cristian Dumitrescu To: dev@dpdk.org Date: Fri, 23 May 2014 16:21:24 +0100 Message-Id: <1400858484-2402-1-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] cmdline: finish at EOF 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, 23 May 2014 15:21:30 -0000 Bug fix in cmdline library to allow return on EOF as opposed to infinite loop. Signed-off-by: Cristian Dumitrescu --- lib/librte_cmdline/cmdline.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) mode change 100644 => 100755 lib/librte_cmdline/cmdline.c diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c old mode 100644 new mode 100755 index 03a3fac..b3dc17c --- a/lib/librte_cmdline/cmdline.c +++ b/lib/librte_cmdline/cmdline.c @@ -256,7 +256,7 @@ cmdline_interact(struct cmdline *cl) c = -1; while (1) { - if (read(cl->s_in, &c, 1) < 0) + if (read(cl->s_in, &c, 1) <= 0) break; if (cmdline_in(cl, &c, 1) < 0) break; -- 1.7.7.6