Move string functions/utils from HAL to std/string
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include "kprintf.h"
|
||||
#include "dlmalloc/malloc.h"
|
||||
#include "hal/hal.h"
|
||||
#include "std/string.h"
|
||||
|
||||
int32_t littlefs_cleanup(struct VfsMountPoint *vmp) {
|
||||
dlfree((void *)vmp->fs.littlefs.instance.cfg);
|
||||
@ -132,7 +133,7 @@ struct VfsObj *littlefs_open(struct VfsMountPoint *vmp, const char *path, uint32
|
||||
if (vobj == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
hal_memset(vobj, 0, sizeof(*vobj));
|
||||
memset(vobj, 0, sizeof(*vobj));
|
||||
spinlock_init(&vobj->spinlock);
|
||||
|
||||
int lfs_flags = 0;
|
||||
@ -214,7 +215,7 @@ int32_t littlefs_fetchdirent(struct VfsMountPoint *vmp, const char *path, FsDire
|
||||
direntbuf->stat.type = FSSTAT_DIR;
|
||||
}
|
||||
|
||||
hal_memcpy(direntbuf->name, entinfo.name, sizeof(direntbuf->name));
|
||||
memcpy(direntbuf->name, entinfo.name, sizeof(direntbuf->name));
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
|
||||
Reference in New Issue
Block a user