Improve logging for shell and fs
This commit is contained in:
parent
c1461694ca
commit
77ac1468fd
@ -6,6 +6,7 @@
|
||||
|
||||
// Castor Only
|
||||
#include <syscall.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/dirent.h>
|
||||
|
||||
#define SHELL_MAX_ARGS 5
|
||||
@ -138,6 +139,10 @@ Cmd_Spawn(int argc, const char *argv[])
|
||||
|
||||
printf("%s\n", argv[1]);
|
||||
status = OSSpawn(argv[1]);
|
||||
if (SYSCALL_ERRCODE(status) != 0) {
|
||||
printf("Spawn failed: %d\n", status);
|
||||
return;
|
||||
}
|
||||
// XXX: check errors
|
||||
status = OSWait(status);
|
||||
printf("Process result: %d\n", status);
|
||||
|
@ -363,7 +363,7 @@ O2FS_ReadDir(VNode *fn, void *buf, uint64_t len, uint64_t *off)
|
||||
|
||||
status = O2FS_Read(fn, &dirEntry, *off, sizeof(dirEntry));
|
||||
if (status != sizeof(dirEntry)) {
|
||||
kprintf("Unexpected error reading directory.");
|
||||
kprintf("Unexpected error reading directory: %d", status);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user