mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] complete: fix parameter complete with multiple '.'
@ 2012-06-24 12:26 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2012-06-24 12:26 UTC (permalink / raw)
  To: barebox

When a device parameter has dots in its name, we have to use strchr instead
of strrchr, because the devicename ends at the first dot, not at the last one.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/complete.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/complete.c b/common/complete.c
index 0780888..a6889ed 100644
--- a/common/complete.c
+++ b/common/complete.c
@@ -221,7 +221,7 @@ static int env_param_complete(struct string_list *sl, char *instr, int eval)
 		end = ' ';
 	}
 
-	instr_param = strrchr(instr, '.');
+	instr_param = strchr(instr, '.');
 	len = strlen(instr);
 
 	current_c = get_current_context();
-- 
1.7.10


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-24 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-24 12:26 [PATCH] complete: fix parameter complete with multiple '.' Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox