From b85919de2b8cc8521807d6d65f2f47e6a4939041 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 27 Sep 2009 16:52:49 +0800 Subject: [PATCH] Debug --- Kernel/vfs/open.c | 5 ++--- Usermode/Applications/cat_src/main.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index 54838e94..e075fb7b 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -520,13 +520,12 @@ int VFS_ChDir(char *New) // Close node if(node->Close) node->Close(node); - // Copy over - strcpy(buf, New); - // Free old and set new free( CFGPTR(CFG_VFS_CWD) ); CFGPTR(CFG_VFS_CWD) = buf; + Log("Updated CWD to '%s'", buf); + return 1; } diff --git a/Usermode/Applications/cat_src/main.c b/Usermode/Applications/cat_src/main.c index a7f3ab32..b6da1cf9 100644 --- a/Usermode/Applications/cat_src/main.c +++ b/Usermode/Applications/cat_src/main.c @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) return -1; } - //printf("Contents of `%s'\n", argv[1]); + printf("Contents of `%s'\n", argv[1]); fd = open(argv[1], OPENFLAG_READ); if(fd == -1) { printf("Unable to open '%s' for reading\n", argv[1]); -- 2.20.1