blob: 85dff1a12635ddcf9381ad076ddb43fbca80eeed (
plain) (
tree)
|
|
#include "std.h"
#include "core/sys.h"
#include <mem/mem.h>
int errno = 0;
void abort() {
monitor_write("\n\n ABORT - errno: ");
monitor_writeDec(errno);
monitor_write("\n");
PANIC("abort() called, probably a memory manager failure.");
}
char *strdup(const char *src) {
char* ret = kmalloc(strlen(src) + 1);
if (ret == NULL) return ret;
strcpy(ret, src);
return ret;
}
|