diff options
author | rsc <rsc> | 2006-07-16 15:41:47 +0000 |
---|---|---|
committer | rsc <rsc> | 2006-07-16 15:41:47 +0000 |
commit | ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed (patch) | |
tree | 3c5f126bb04d4c6c26dcb8295959fad224dfbf5d /bootmain.c | |
parent | 6b765c480f8c810fc495a32baa696bbeb75adc09 (diff) | |
download | xv6-labs-ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed.tar.gz xv6-labs-ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed.tar.bz2 xv6-labs-ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed.zip |
standardize on not using foo_ prefix in struct foo
Diffstat (limited to 'bootmain.c')
-rw-r--r-- | bootmain.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -45,18 +45,18 @@ cmain(void) readseg((uint32_t) ELFHDR, SECTSIZE*8, 0); // is this a valid ELF? - if (ELFHDR->e_magic != ELF_MAGIC) + if (ELFHDR->magic != ELF_MAGIC) goto bad; // load each program segment (ignores ph flags) - ph = (struct Proghdr *) ((uint8_t *) ELFHDR + ELFHDR->e_phoff); - eph = ph + ELFHDR->e_phnum; + ph = (struct Proghdr *) ((uint8_t *) ELFHDR + ELFHDR->phoff); + eph = ph + ELFHDR->phnum; for (; ph < eph; ph++) - readseg(ph->p_va, ph->p_memsz, ph->p_offset); + readseg(ph->va, ph->memsz, ph->offset); // call the entry point from the ELF header // note: does not return! - ((void (*)(void)) (ELFHDR->e_entry & 0xFFFFFF))(); + ((void (*)(void)) (ELFHDR->entry & 0xFFFFFF))(); bad: outw(0x8A00, 0x8A00); |