diff options
| author | Atish Patra <[email protected]> | 2019-06-18 14:54:04 -0700 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2019-06-19 09:48:59 +0530 |
| commit | 200ed7c1bdb4d39caf9d0126e3741e72982852b0 (patch) | |
| tree | 11bff85604758f4af128920635091c42d84f1dfb /include | |
| parent | 793e5e1184f04012804914bd922e68536f3b68dd (diff) | |
lib: Rename string.x to sbi_string.x
All string functions are part of libsbi. It makes more sense
to rename them to sbi_string.x as the libsbi can be linked
with external libraries that can have similar implementation.
Signed-off-by: Atish Patra <[email protected]>
Acked-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_string.h | 39 | ||||
| -rw-r--r-- | include/sbi/string.h | 39 |
2 files changed, 39 insertions, 39 deletions
diff --git a/include/sbi/sbi_string.h b/include/sbi/sbi_string.h new file mode 100644 index 00000000..338075fc --- /dev/null +++ b/include/sbi/sbi_string.h @@ -0,0 +1,39 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Western Digital Corporation or its affiliates. + * + * Authors: + * Atish Patra <[email protected]> + */ + +#ifndef __STRING_H__ +#define __STRING_H__ + +#include <sbi/sbi_types.h> + +int sbi_strcmp(const char *a, const char *b); + +size_t sbi_strlen(const char *str); + +size_t sbi_strnlen(const char *str, size_t count); + +char *sbi_strcpy(char *dest, const char *src); + +char *sbi_strncpy(char *dest, const char *src, size_t count); + +char *sbi_strchr(const char *s, int c); + +char *sbi_strrchr(const char *s, int c); + +void *sbi_memset(void *s, int c, size_t count); + +void *sbi_memcpy(void *dest, const void *src, size_t count); + +void *sbi_memmove(void *dest, const void *src, size_t count); + +int sbi_memcmp(const void *s1, const void *s2, size_t count); + +void *sbi_memchr(const void *s, int c, size_t count); + +#endif diff --git a/include/sbi/string.h b/include/sbi/string.h deleted file mode 100644 index 8259ef56..00000000 --- a/include/sbi/string.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2019 Western Digital Corporation or its affiliates. - * - * Authors: - * Atish Patra <[email protected]> - */ - -#ifndef __STRING_H__ -#define __STRING_H__ - -#include <sbi/sbi_types.h> - -int strcmp(const char *a, const char *b); - -size_t strlen(const char *str); - -size_t strnlen(const char *str, size_t count); - -char *strcpy(char *dest, const char *src); - -char *strncpy(char *dest, const char *src, size_t count); - -char *strchr(const char *s, int c); - -char *strrchr(const char *s, int c); - -void *memset(void *s, int c, size_t count); - -void *memcpy(void *dest, const void *src, size_t count); - -void *memmove(void *dest, const void *src, size_t count); - -int memcmp(const void *s1, const void *s2, size_t count); - -void *memchr(const void *s, int c, size_t count); - -#endif |
