Improve logging for shell and fs

This commit is contained in:
Ali Mashtizadeh 2015-12-01 15:15:12 -08:00
parent c1461694ca
commit 77ac1468fd
2 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@
// Castor Only // Castor Only
#include <syscall.h> #include <syscall.h>
#include <sys/syscall.h>
#include <sys/dirent.h> #include <sys/dirent.h>
#define SHELL_MAX_ARGS 5 #define SHELL_MAX_ARGS 5
@ -138,6 +139,10 @@ Cmd_Spawn(int argc, const char *argv[])
printf("%s\n", argv[1]); printf("%s\n", argv[1]);
status = OSSpawn(argv[1]); status = OSSpawn(argv[1]);
if (SYSCALL_ERRCODE(status) != 0) {
printf("Spawn failed: %d\n", status);
return;
}
// XXX: check errors // XXX: check errors
status = OSWait(status); status = OSWait(status);
printf("Process result: %d\n", status); printf("Process result: %d\n", status);

View File

@ -363,7 +363,7 @@ O2FS_ReadDir(VNode *fn, void *buf, uint64_t len, uint64_t *off)
status = O2FS_Read(fn, &dirEntry, *off, sizeof(dirEntry)); status = O2FS_Read(fn, &dirEntry, *off, sizeof(dirEntry));
if (status != sizeof(dirEntry)) { if (status != sizeof(dirEntry)) {
kprintf("Unexpected error reading directory."); kprintf("Unexpected error reading directory: %d", status);
return status; return status;
} }