summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2012-05-14 12:54:56 -0700
committerVadim Bendebury <vbendeb@chromium.org>2012-05-14 13:35:03 -0700
commit6a324c1de569529b26ebc694ceca3a66c38c989d (patch)
tree3886d4be6989ff6aa1ea2c8ec649761d9f56d7b3 /include/util.h
parent55898c8b4b14521bf6c188a7d7e034a9b1ae7b35 (diff)
downloadchrome-ec-6a324c1de569529b26ebc694ceca3a66c38c989d.tar.gz
Allow console commands abbreviation
The EC console input handling code is being enhanced to accept abbreviated command names. If the abbreviation is unique, the appropriate command is used, if the abbreviation is ambiguous, the command is handled as nonexistent. The error message is being modified to mention that the command either does not exist or is ambiguous. This change also makes it impossible to have command names matching the beginning of other command names. Two such cases are being fixed (`ch' renamed to `chan' and `thermal' renamed to 'thermalconf'). BUG=none TEST=manual . program the new EC image. Try entering at the console: > h Command 'h' either not found or ambiguous. Command returned error 1 > he Known commands: adc autofan battery ch charger ... > help Known commands: adc autofan battery ch charger ... Change-Id: Iaa3e91e1504e42daefb02d561e00c39003548197 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index 3fb0657061..6bbb8dd7df 100644
--- a/include/util.h
+++ b/include/util.h
@@ -66,6 +66,7 @@ void *memcpy(void *dest, const void *src, int len);
void *memset(void *dest, int c, int len);
void *memmove(void *dest, const void *src, int len);
int strcasecmp(const char *s1, const char *s2);
+int strncasecmp(const char *s1, const char *s2, int size);
int strlen(const char *s);
int strtoi(const char *nptr, char **endptr, int base);