[PATCH] complete: fix parameter complete with multiple '.'

Sascha Hauer s.hauer at pengutronix.de
Sun Jun 24 08:26:41 EDT 2012


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 at 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




More information about the barebox mailing list