dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cmdline: finish at EOF
@ 2014-05-23 15:21 Cristian Dumitrescu
       [not found] ` <1400858484-2402-1-git-send-email-cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Cristian Dumitrescu @ 2014-05-23 15:21 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

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

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-28 13:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 15:21 [PATCH] cmdline: finish at EOF Cristian Dumitrescu
     [not found] ` <1400858484-2402-1-git-send-email-cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-05-23 15:32   ` Olivier MATZ
     [not found]     ` <537F6A02.3020106-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-05-26 14:27       ` Olivier MATZ
     [not found]         ` <53834F51.4070703-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-05-27 18:38           ` Dumitrescu, Cristian
     [not found]             ` <3EB4FA525960D640B5BDFFD6A3D891261B1BE8A9-kPTMFJFq+rFP9JyJpTNKArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-05-28 13:23               ` Olivier MATZ
2014-05-26 15:18       ` Thomas Monjalon

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).