diff options
author | rsc <rsc> | 2006-07-17 01:58:13 +0000 |
---|---|---|
committer | rsc <rsc> | 2006-07-17 01:58:13 +0000 |
commit | b5f17007f41770fee97fa850635976ceb7aa7492 (patch) | |
tree | 779473b174de7542e73219aed716d1c666a08a11 /main.c | |
parent | e0966f459f5543faf9e574b7415bec2bf11e6b42 (diff) | |
download | xv6-labs-b5f17007f41770fee97fa850635976ceb7aa7492.tar.gz xv6-labs-b5f17007f41770fee97fa850635976ceb7aa7492.tar.bz2 xv6-labs-b5f17007f41770fee97fa850635976ceb7aa7492.zip |
standarize on unix-like lowercase struct names
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -57,8 +57,8 @@ main0(void) p->mem = kalloc(p->sz); memset(p->mem, 0, p->sz); p->kstack = kalloc(KSTACKSIZE); - p->tf = (struct Trapframe *) (p->kstack + KSTACKSIZE - sizeof(struct Trapframe)); - memset(p->tf, 0, sizeof(struct Trapframe)); + p->tf = (struct trapframe *) (p->kstack + KSTACKSIZE - sizeof(struct trapframe)); + memset(p->tf, 0, sizeof(struct trapframe)); p->tf->es = p->tf->ds = p->tf->ss = (SEG_UDATA << 3) | 3; p->tf->cs = (SEG_UCODE << 3) | 3; p->tf->eflags = FL_IF; @@ -110,11 +110,11 @@ void load_icode(struct proc *p, uint8_t *binary, uint size) { int i; - struct Elf *elf; - struct Proghdr *ph; + struct elfhdr *elf; + struct proghdr *ph; // Check magic number on binary - elf = (struct Elf*) binary; + elf = (struct elfhdr*) binary; cprintf("elf %x magic %x\n", elf, elf->magic); if (elf->magic != ELF_MAGIC) panic("load_icode: not an ELF binary"); @@ -123,7 +123,7 @@ load_icode(struct proc *p, uint8_t *binary, uint size) p->tf->esp = p->sz; // Map and load segments as directed. - ph = (struct Proghdr*) (binary + elf->phoff); + ph = (struct proghdr*) (binary + elf->phoff); for (i = 0; i < elf->phnum; i++, ph++) { if (ph->type != ELF_PROG_LOAD) continue; |