On Sat, 2006-10-14 at 11:03 +0800, Mao, Bibo wrote:
>    I do not know whether it is possible to add one element in
> structure grub_elf_file structure to identify ELF type
> (ELFCLASS32/ELFCLASS64) and ELF machine type, this element can be set
> at function grub_elf_open.

I'm not sure it saves much, since you'd still want a wrapper function,
and the info is already present in `ehdr' anyways. It comes down to
        int grub_elf_is_elf32 (grub_elf_t elf)
        {
          return elf->ehdr.ehdr32.e_ident[EI_CLASS] == ELFCLASS32;
        }
vs
        int grub_elf_is_elf32 (grub_elf_t elf)
        {
          return elf->class == ELFCLASS32;
        }

-Hollis



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to