diff options
author | Frans Kaashoek <kaashoek@fransk-6.local> | 2010-07-02 14:51:53 -0400 |
---|---|---|
committer | Frans Kaashoek <kaashoek@fransk-6.local> | 2010-07-02 14:51:53 -0400 |
commit | 40889627ba50db29a64bc6a1553c2b21e6a99b78 (patch) | |
tree | 7cb8f51492af706cafdcaf1b01a5cac8073d5a38 /sysfile.c | |
parent | b7a517f2277670e156f150ee2cb7aae6426c6aef (diff) | |
download | xv6-labs-40889627ba50db29a64bc6a1553c2b21e6a99b78.tar.gz xv6-labs-40889627ba50db29a64bc6a1553c2b21e6a99b78.tar.bz2 xv6-labs-40889627ba50db29a64bc6a1553c2b21e6a99b78.zip |
Initial version of single-cpu xv6 with page tables
Diffstat (limited to 'sysfile.c')
-rw-r--r-- | sysfile.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -264,7 +264,6 @@ sys_open(void) if(argstr(0, &path) < 0 || argint(1, &omode) < 0) return -1; - if(omode & O_CREATE){ if((ip = create(path, T_FILE, 0, 0)) == 0) return -1; @@ -291,7 +290,6 @@ sys_open(void) f->off = 0; f->readable = !(omode & O_WRONLY); f->writable = (omode & O_WRONLY) || (omode & O_RDWR); - return fd; } @@ -350,8 +348,9 @@ sys_exec(void) int i; uint uargv, uarg; - if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0) + if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0) { return -1; + } memset(argv, 0, sizeof(argv)); for(i=0;; i++){ if(i >= NELEM(argv)) |