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

@ -9,6 +9,7 @@
#include "util/util.h"
#include "hshtb.h"
#include "dev/dev.h"
#include "std/string.h"
int32_t SYSCALL2(sys_dev_gethandle, dev1, devname1) {
uint64_t *devh = (uint64_t *)dev1;
@ -87,7 +88,7 @@ int32_t SYSCALL2(sys_dev_stat, devstat1, idx1) {
for (size_t i = 0; i < LEN(DEVTABLE.devs); i++) {
if (i == idx && DEVTABLE.devs[i]._hshtbstate == HSHTB_TAKEN) {
Dev *dev = &DEVTABLE.devs[i];
hal_memcpy(devstat->name, dev->ident, sizeof(dev->ident));
memcpy(devstat->name, dev->ident, sizeof(dev->ident));
for (size_t j = 0; j < DEV_FNS_MAX; j++) {
if (dev->fns[j] != NULL) {
devstat->nfns++;