Skip to content

Commit 497eadc

Browse files
KaigeFulijinxia
authored andcommitted
lib: Move all str ops functions to one src file
Move all string operations functions into a single source code file, instead of the various source code files that just implement a single or few function. No functional change. Signed-off-by: Kaige Fu <kaige.fu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 7aaff68 commit 497eadc

File tree

11 files changed

+592
-816
lines changed

11 files changed

+592
-816
lines changed

hypervisor/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,13 @@ C_SRCS += arch/x86/guest/ucode.c
119119
C_SRCS += arch/x86/guest/pm.c
120120
C_SRCS += lib/spinlock.c
121121
C_SRCS += lib/udelay.c
122-
C_SRCS += lib/strnlen.c
123122
C_SRCS += lib/memchr.c
124-
C_SRCS += lib/stdlib.c
125123
C_SRCS += lib/memcpy.c
126-
C_SRCS += lib/strtol.c
127124
C_SRCS += lib/mdelay.c
128125
C_SRCS += lib/div.c
129-
C_SRCS += lib/strchr.c
130-
C_SRCS += lib/strcpy.c
126+
C_SRCS += lib/string.c
131127
C_SRCS += lib/memset.c
132128
C_SRCS += lib/mem_mgt.c
133-
C_SRCS += lib/strncpy.c
134129
C_SRCS += lib/crypto/tinycrypt/hmac.c
135130
C_SRCS += lib/crypto/tinycrypt/sha256.c
136131
C_SRCS += lib/crypto/hkdf.c

hypervisor/include/hv_lib.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include <util.h>
4242
#include <list.h>
4343
#include <bits.h>
44-
#include <strtol.h>
4544
#include <sprintf.h>
4645

4746
#endif /* HV_LIB_H */

hypervisor/include/lib/rtl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ void *memset(void *base, uint8_t v, size_t n);
6464
void *memcpy_s(void *d, size_t dmax, const void *s, size_t slen);
6565
int udiv64(uint64_t dividend, uint64_t divisor, struct udiv_result *res);
6666
int udiv32(uint32_t dividend, uint32_t divisor, struct udiv_result *res);
67+
int atoi(const char *str);
68+
long strtol(const char *nptr, char **endptr, register int base);
69+
uint64_t strtoul(const char *nptr, char **endptr, register int base);
6770

6871
extern uint64_t tsc_hz;
6972
#define US_TO_TICKS(x) ((x) * tsc_hz / 1000000UL)

hypervisor/include/lib/strtol.h

Lines changed: 0 additions & 38 deletions
This file was deleted.

hypervisor/lib/stdlib.c

Lines changed: 0 additions & 62 deletions
This file was deleted.

hypervisor/lib/strchr.c

Lines changed: 0 additions & 39 deletions
This file was deleted.

hypervisor/lib/strcpy.c

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)