Move string functions/utils from HAL to std/string
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#include "kprintf.h"
|
||||
#include "dlmalloc/malloc.h"
|
||||
#include "ipc/pipe/pipe.h"
|
||||
#include "std/string.h"
|
||||
|
||||
#define _MP_MAX 0xff
|
||||
#define _PATH_MAX VFS_PATH_MAX
|
||||
@ -178,7 +179,7 @@ int32_t SYSCALL4(sys_proc_argv, pid1, argslen1, argbuf1, maxargs1) {
|
||||
ret = E_INVALIDARGUMENT;
|
||||
goto done;
|
||||
}
|
||||
hal_strcpy(argbuf[i], arg->string);
|
||||
strcpy(argbuf[i], arg->string);
|
||||
}
|
||||
*argslen = i;
|
||||
|
||||
@ -214,7 +215,7 @@ int32_t SYSCALL2(sys_proc_stat, pidx, pstat1) {
|
||||
LL_FOREACH_SAFE_IDX(PROCS.procs, p, ptmp, i) {
|
||||
if (i == pidx) {
|
||||
stat->pid = p->pid;
|
||||
hal_strcpy(stat->name, p->name);
|
||||
strcpy(stat->name, p->name);
|
||||
stat->state = p->state;
|
||||
|
||||
VasRange *vas, *vastmp;
|
||||
@ -222,7 +223,7 @@ int32_t SYSCALL2(sys_proc_stat, pidx, pstat1) {
|
||||
stat->usemem += vas->size;
|
||||
}
|
||||
|
||||
hal_memcpy(&stat->time, &p->time, sizeof(p->time));
|
||||
memcpy(&stat->time, &p->time, sizeof(p->time));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user