DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] cmdline: finish at EOF
Date: Fri, 23 May 2014 16:21:24 +0100	[thread overview]
Message-ID: <1400858484-2402-1-git-send-email-cristian.dumitrescu@intel.com> (raw)

Bug fix in cmdline library to allow return on EOF as opposed to infinite loop.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 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

             reply	other threads:[~2014-05-23 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 15:21 Cristian Dumitrescu [this message]
2014-05-23 15:32 ` Olivier MATZ
2014-05-26 14:27   ` Olivier MATZ
2014-05-27 18:38     ` Dumitrescu, Cristian
2014-05-28 13:23       ` Olivier MATZ
2014-05-26 15:18   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400858484-2402-1-git-send-email-cristian.dumitrescu@intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).