Debug
authorJohn Hodge <[email protected]>
Sun, 27 Sep 2009 08:52:49 +0000 (16:52 +0800)
committerJohn Hodge <[email protected]>
Sun, 27 Sep 2009 08:52:49 +0000 (16:52 +0800)
Kernel/vfs/open.c
Usermode/Applications/cat_src/main.c

index 54838e9..e075fb7 100644 (file)
@@ -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;
 }
 
index a7f3ab3..b6da1cf 100644 (file)
@@ -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]);

UCC git Repository :: git.ucc.asn.au