summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/minilibc.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2000-12-12 21:05:30 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2000-12-12 21:05:30 +0000
commit2b2914cc04a93ca362e4eb3663061c3039aa4049 (patch)
tree3f8dbeae1bc114e58f3246cd76b9b0156392b720 /mdk-stage1/minilibc.c
parent7852f76ee05551c05a4f833f9a55bec15f44f85d (diff)
downloaddrakx-backup-do-not-use-2b2914cc04a93ca362e4eb3663061c3039aa4049.tar
drakx-backup-do-not-use-2b2914cc04a93ca362e4eb3663061c3039aa4049.tar.gz
drakx-backup-do-not-use-2b2914cc04a93ca362e4eb3663061c3039aa4049.tar.bz2
drakx-backup-do-not-use-2b2914cc04a93ca362e4eb3663061c3039aa4049.tar.xz
drakx-backup-do-not-use-2b2914cc04a93ca362e4eb3663061c3039aa4049.zip
- add pci probing feature
- add listing of available modules and insmod'ing on user request - make rescue-stage2 working
Diffstat (limited to 'mdk-stage1/minilibc.c')
-rw-r--r--mdk-stage1/minilibc.c15
1 files changed, 15 insertions, 0 deletions
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];