Move string functions/utils from HAL to std/string

This commit is contained in:
2025-11-11 19:54:09 +01:00
parent f5dae4984d
commit 344952fb5f
27 changed files with 200 additions and 228 deletions

View File

@ -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++;