ref: 15a75e40d01c61eead24204b89ddd8d294b6d1fd
parent: 21312484117fbebf8300841684b613a1b3a993fd
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Sun Dec 25 19:46:07 EST 2011
9boot: replace strrchr() call with a loop and strchr() for ignoring bang path prefixes
--- a/sys/src/boot/pc/sub.c
+++ b/sys/src/boot/pc/sub.c
@@ -66,17 +66,6 @@
return 0;
}
-char*
-strrchr(char *s, int c)
-{- char *r = 0;
-
- while(s = strchr(s, c))
- r = s++;
-
- return r;
-}
-
void
print(char *s)
{@@ -264,7 +253,7 @@
print("no bootfile\r\n");goto Loop;
}
- if(p = strrchr(kern, '!'))
+ while(p = strchr(kern, '!'))
kern = p+1;
return kern;
--
⑨