Messages in this thread | | | Date | Wed, 20 Jan 1999 18:07:44 -0500 | From | Mark Lord <> | Subject | 2.2.0: kernel strstr() is broken |
| |
Hi.
The strstr() function appears to be broken for i386 with 2.2.0, which in turn, breaks IOMEGA ATAPI ZIP drive detection in ide-probe.c (which relies on a strstr() during the probe).
For example, this code (inserted into the kernel): { static int done = 0; static char buf[64]; if (!done++) { strcpy(buf,"This is a ZIP test"); printk("buf at %p: \"%s\"\n", buf, buf); printk("strstr(buf,\"XXX\") gives %p\n", strstr(buf,"XXX")); printk("strstr(buf,\"Thi\") gives %p\n", strstr(buf,"Thi")); printk("strstr(buf,\"est\") gives %p\n", strstr(buf,"est")); printk("strstr(buf,\"ZIP\") gives %p\n", strstr(buf,"ZIP")); } }
gives this output:
Jan 20 18:02:21 foxy kernel: buf at c026de20: "This is a ZIP test" Jan 20 18:02:21 foxy kernel: strstr(buf,"XXX") gives c026de20 Jan 20 18:02:21 foxy kernel: strstr(buf,"Thi") gives c026de20 Jan 20 18:02:21 foxy kernel: strstr(buf,"est") gives c026de20 Jan 20 18:02:21 foxy kernel: strstr(buf,"ZIP") gives c026de20
strstr() is broken.
-- mlord@pobox.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |