diff options
author | rsc <rsc> | 2007-08-24 20:54:23 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-24 20:54:23 +0000 |
commit | 07090dd705df557cba5ce4ea46b2a274876343a5 (patch) | |
tree | 4e4c4415c702ff4c041e101ab3c7173fd636d9d0 /exec.c | |
parent | fa1b34106ad99cf8021227b4c1e62353ae4d0fda (diff) | |
download | xv6-labs-07090dd705df557cba5ce4ea46b2a274876343a5.tar.gz xv6-labs-07090dd705df557cba5ce4ea46b2a274876343a5.tar.bz2 xv6-labs-07090dd705df557cba5ce4ea46b2a274876343a5.zip |
Remove struct uinode.
Remove type arg to mknod (assume T_DEV).
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -29,8 +29,9 @@ exec(char *path, char **argv) sz = 0; mem = 0; - if((ip = ilock(namei(path))) == 0) + if((ip = namei(path)) == 0) return -1; + ilock(ip); if(readi(ip, (char*)&elf, 0, sizeof(elf)) < sizeof(elf)) goto bad; @@ -112,8 +113,7 @@ exec(char *path, char **argv) goto bad2; memset(cp->mem + ph.va + ph.filesz, 0, ph.memsz - ph.filesz); } - - iput(iunlock(ip)); + iunlockput(ip); cp->tf->eip = elf.entry; cp->tf->esp = sp; @@ -124,11 +124,11 @@ exec(char *path, char **argv) bad: if(mem) kfree(mem, sz); - iput(iunlock(ip)); + iunlockput(ip); return -1; bad2: - iput(iunlock(ip)); + iunlockput(ip); proc_exit(); return 0; } |