summaryrefslogtreecommitdiff
path: root/sysfile.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2010-07-02 14:51:53 -0400
committerFrans Kaashoek <[email protected]>2010-07-02 14:51:53 -0400
commit40889627ba50db29a64bc6a1553c2b21e6a99b78 (patch)
tree7cb8f51492af706cafdcaf1b01a5cac8073d5a38 /sysfile.c
parentb7a517f2277670e156f150ee2cb7aae6426c6aef (diff)
downloadxv6-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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sysfile.c b/sysfile.c
index 3eec766..6b8eef4 100644
--- a/sysfile.c
+++ b/sysfile.c
@@ -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))