summaryrefslogtreecommitdiffstats
path: root/common/complete.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-06-24 14:25:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-30 20:23:26 +0200
commit4d5a9be0dcdffa64faf8020185c600890f2391b4 (patch)
tree7e62f6e88900020035f1d18a18d75d4712f2d95a /common/complete.c
parenta6e358b2f5b219fda18a7bc9348cb969043c19d5 (diff)
downloadbarebox-4d5a9be0dcdffa64faf8020185c600890f2391b4.tar.gz
complete: fix parameter complete with multiple '.'
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>
Diffstat (limited to 'common/complete.c')
-rw-r--r--common/complete.c2
1 files changed, 1 insertions, 1 deletions
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();