From 2b2914cc04a93ca362e4eb3663061c3039aa4049 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 12 Dec 2000 21:05:30 +0000 Subject: - add pci probing feature - add listing of available modules and insmod'ing on user request - make rescue-stage2 working --- mdk-stage1/minilibc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mdk-stage1/minilibc.c') diff --git a/mdk-stage1/minilibc.c b/mdk-stage1/minilibc.c index c98d87e24..ac0ffe334 100644 --- a/mdk-stage1/minilibc.c +++ b/mdk-stage1/minilibc.c @@ -188,6 +188,21 @@ char * strchr(char * str, int ch) return NULL; } + +char * strstr(char *haystack, char *needle) +{ + char * tmp = haystack; + while ((tmp = strchr(tmp, needle[0])) != NULL) { + int i = 1; + while (i < strlen(tmp) && i < strlen(needle) && tmp[i] == needle[i]) + i++; + if (needle[i] == '\0') + return tmp; + tmp++; + } + return NULL; +} + void print_int(int fd, int i) { char buf[10]; -- cgit v1.2.1