We are lazy, so we implement it via strncmp, using a practically infinite counter.
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- inmates/lib/inmate_common.h | 1 + inmates/lib/string.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/inmates/lib/inmate_common.h b/inmates/lib/inmate_common.h index dd5d440..c4c6b17 100644 --- a/inmates/lib/inmate_common.h +++ b/inmates/lib/inmate_common.h @@ -41,6 +41,7 @@ void *memset(void *s, int c, unsigned long n); void *memcpy(void *d, const void *s, unsigned long n); unsigned long strlen(const char *s); int strncmp(const char *s1, const char *s2, unsigned long n); +int strcmp(const char *s1, const char *s2); const char *cmdline_parse_str(const char *param, char *value_buffer, unsigned long buffer_size, diff --git a/inmates/lib/string.c b/inmates/lib/string.c index 7816140..e013e5a 100644 --- a/inmates/lib/string.c +++ b/inmates/lib/string.c @@ -46,3 +46,8 @@ int strncmp(const char *s1, const char *s2, unsigned long n) } return 0; } + +int strcmp(const char *s1, const char *s2) +{ + return strncmp(s1, s2, -1); +} -- 2.1.4 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.