C userspace programs
This commit is contained in:
@ -5,14 +5,9 @@
|
||||
#include "kprintf.h"
|
||||
#include "proc/proc.h"
|
||||
|
||||
int32_t SYSCALL2(sys_debugprint, string1, len) {
|
||||
char *buf = dlmalloc(len);
|
||||
if (buf == NULL) {
|
||||
return E_NOMEMORY;
|
||||
}
|
||||
ksnprintf(buf, len, "%s", string1);
|
||||
kprintf("%s\n", buf);
|
||||
dlfree(buf);
|
||||
int32_t SYSCALL1(sys_debugprint, string) {
|
||||
char *p = (char *)string;
|
||||
kprintf("%s\n", p);
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user