aboutsummaryrefslogtreecommitdiff
path: root/src/include/string.h
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-03-01 10:16:01 +0000
committerStefan Reinauer <stepan@openbios.org>2009-03-01 10:16:01 +0000
commit36c83404a356b5dc379dbd46e25514e487f01ec8 (patch)
treef2c9a9637dd0142ec72afd2d6f6f81a2eff877fb /src/include/string.h
parent2b34db8d1de2d63ffa829fe03db0ce2aaba40233 (diff)
Some changes required to get yabel working on v2 (and they generally make
sense, too). Have one u64 instead of three. In order to use the old bios emulator, you have to do nothing. (Default, if CONFIG_PCI_ROM_RUN is enabled) In order to use yabel in your target, you need to add the following lines to your config: uses CONFIG_PCI_OPTION_ROM_RUN_YABEL default CONFIG_PCI_OPTION_ROM_RUN_YABEL=1 In order to use vm86 in your target, you need to add the following lines to your config: uses CONFIG_PCI_OPTION_ROM_RUN_VM86 default CONFIG_PCI_OPTION_ROM_RUN_VM86=1 Note: vm86 only works on platforms with _RAMBASE in the lower megabyte. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Joseph Smith <joe@settoplinux.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3965 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/include/string.h')
-rw-r--r--src/include/string.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/string.h b/src/include/string.h
index 25e741e810..d82b3ac1c4 100644
--- a/src/include/string.h
+++ b/src/include/string.h
@@ -81,6 +81,18 @@ static inline int strcmp(const char *s1, const char *s2)
return r;
}
+static inline int strncmp(const char *s1, const char *s2, int maxlen)
+{
+ int i;
+
+ for (i = 0; i < maxlen; i++) {
+ if (s1[i] != s2[i])
+ return s1[i] - s2[i];
+ }
+
+ return 0;
+}
+
static inline int isspace(int c)
{
switch (c) {