mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-27 03:20:56 +07:00
cf9b111c17
Remove old comments that include the old arch/i386 directory. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
51 lines
995 B
C
51 lines
995 B
C
/* -*- linux-c -*- ------------------------------------------------------- *
|
|
*
|
|
* Copyright (C) 1991, 1992 Linus Torvalds
|
|
* Copyright 2007 rPath, Inc. - All Rights Reserved
|
|
*
|
|
* This file is part of the Linux kernel, and is made available under
|
|
* the terms of the GNU General Public License version 2.
|
|
*
|
|
* ----------------------------------------------------------------------- */
|
|
|
|
/*
|
|
* Very basic string functions
|
|
*/
|
|
|
|
#include "boot.h"
|
|
|
|
int strcmp(const char *str1, const char *str2)
|
|
{
|
|
const unsigned char *s1 = (const unsigned char *)str1;
|
|
const unsigned char *s2 = (const unsigned char *)str2;
|
|
int delta = 0;
|
|
|
|
while (*s1 || *s2) {
|
|
delta = *s2 - *s1;
|
|
if (delta)
|
|
return delta;
|
|
s1++;
|
|
s2++;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
size_t strnlen(const char *s, size_t maxlen)
|
|
{
|
|
const char *es = s;
|
|
while (*es && maxlen) {
|
|
es++;
|
|
maxlen--;
|
|
}
|
|
|
|
return (es - s);
|
|
}
|
|
|
|
unsigned int atou(const char *s)
|
|
{
|
|
unsigned int i = 0;
|
|
while (isdigit(*s))
|
|
i = i * 10 + (*s++ - '0');
|
|
return i;
|
|
}
|