aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-10 20:12:10 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-10 20:12:10 +0100
commit6d9cd139c42a48f5ddf8f8e284f56873de73fd31 (patch)
tree7b4ca008eb6375c0d5ba9eb1456674ee996fb5d6 /src/lib
parent4ab8b6206b1ba36cbf4db4a416e04304bbd7ebc0 (diff)
downloadkogata-6d9cd139c42a48f5ddf8f8e284f56873de73fd31.tar.gz
kogata-6d9cd139c42a48f5ddf8f8e284f56873de73fd31.zip
Things are happenning ; lots of bugs.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libkogata/debug.c4
-rw-r--r--src/lib/libkogata/syscall.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libkogata/debug.c b/src/lib/libkogata/debug.c
index a8b9414..ac3e0e2 100644
--- a/src/lib/libkogata/debug.c
+++ b/src/lib/libkogata/debug.c
@@ -5,13 +5,13 @@
#include <syscall.h>
void panic(const char* msg, const char* file, int line) {
- dbg_printf("Panic '%s', at %s:%d\n", msg, file, line);
+ dbg_printf("PANIC in user process\n %s\n at %s:%d\n", msg, file, line);
exit(-1);
while(true);
}
void panic_assert(const char* assert, const char* file, int line) {
- dbg_printf("Assert failed '%s', at %s:%d\n", assert, file, line);
+ dbg_printf("ASSERT FAILED in user process\n %s\n at %s:%d\n", assert, file, line);
exit(-1);
while(true);
}
diff --git a/src/lib/libkogata/syscall.c b/src/lib/libkogata/syscall.c
index 67f95fd..bf0b35e 100644
--- a/src/lib/libkogata/syscall.c
+++ b/src/lib/libkogata/syscall.c
@@ -182,7 +182,7 @@ bool bind_make_fs(pid_t pid, const char* name, const char* driver, fd_t source,
return call(SC_BIND_MAKE_FS, (uint32_t)&args, 0, 0, 0, 0);
}
bool bind_fd(pid_t pid, fd_t new_fd, fd_t fd) {
- return call(SC_BIND_FD, new_fd, fd, 0, 0, 0);
+ return call(SC_BIND_FD, pid, new_fd, fd, 0, 0);
}
bool proc_exec(pid_t pid, const char* file) {
return call(SC_PROC_EXEC, pid, (uint32_t)file, strlen(file), 0, 0);