diff options
author | Russ Cox <[email protected]> | 2009-08-30 23:02:08 -0700 |
---|---|---|
committer | Russ Cox <[email protected]> | 2009-08-30 23:02:08 -0700 |
commit | 48755214c9a02d6249caf3126d3b41d67eda4730 (patch) | |
tree | 2edc8b996fd7c3ef2da8876d657140e242999d93 /exec.c | |
parent | 0aef8914959af9e472852611eb6352c211093d35 (diff) | |
download | xv6-labs-48755214c9a02d6249caf3126d3b41d67eda4730.tar.gz xv6-labs-48755214c9a02d6249caf3126d3b41d67eda4730.tar.bz2 xv6-labs-48755214c9a02d6249caf3126d3b41d67eda4730.zip |
assorted fixes:
* rename c/cp to cpu/proc
* rename cpu.context to cpu.scheduler
* fix some comments
* formatting for printout
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -11,7 +11,7 @@ exec(char *path, char **argv) { char *mem, *s, *last; int i, argc, arglen, len, off; - uint sz, sp, argp, x; + uint sz, sp, argp; struct elfhdr elf; struct inode *ip; struct proghdr ph; @@ -103,14 +103,14 @@ exec(char *path, char **argv) for(last=s=path; *s; s++) if(*s == '/') last = s+1; - safestrcpy(cp->name, last, sizeof(cp->name)); + safestrcpy(proc->name, last, sizeof(proc->name)); // Commit to the new image. - kfree(cp->mem, cp->sz); - cp->mem = mem; - cp->sz = sz; - cp->tf->eip = elf.entry; // main - cp->tf->esp = sp; + kfree(proc->mem, proc->sz); + proc->mem = mem; + proc->sz = sz; + proc->tf->eip = elf.entry; // main + proc->tf->esp = sp; usegment(); return 0; |