2009-12-24 Carles Pina i Estany <carles@pina.cat>
* bus/usb/usbhub.c: Fix capitalization, fullstop and newlines in grub_errno calls. * commands/acpi.c: Likewise. * commands/blocklist.c: Likewise. * commands/efi/loadbios.c: Likewise. * commands/i386/pc/drivemap.c: Likewise. * commands/loadenv.c: Likewise. * commands/memrw.c: Likewise. * commands/password.c: Likewise. * commands/videotest.c: Likewise. * disk/ata.c: Likewise. * disk/ata_pthru.c: Likewise. * disk/dmraid_nvidia.c: Likewise. * disk/ieee1275/nand.c: Likewise. * disk/ieee1275/ofdisk.c: Likewise. * disk/loopback.c: Likewise. * disk/lvm.c: Likewise. * disk/mdraid_linux.c: Likewise. * disk/raid.c: Likewise. * disk/raid6_recover.c: Likewise. * disk/scsi.c: Likewise. * efiemu/main.c: Likewise. * efiemu/mm.c: Likewise. * efiemu/pnvram.c: Likewise. * efiemu/symbols.c: Likewise. * font/font.c: Likewise. * fs/cpio.c: Likewise. * fs/hfsplus.c: Likewise. * fs/iso9660.c: Likewise. * fs/jfs.c: Likewise. * fs/minix.c: Likewise. * fs/ntfs.c: Likewise. * fs/ntfscomp.c: Likewise. * fs/reiserfs.c: Likewise. * fs/ufs.c: Likewise. * fs/xfs.c: Likewise. * gettext/gettext.c: Likewise. * include/grub/auth.h: Likewise. * kern/elf.c: Likewise. * kern/file.c: Likewise. * kern/ieee1275/init.c: Likewise. * kern/ieee1275/mmap.c: Likewise. * kern/ieee1275/openfw.c: Likewise. * kern/powerpc/dl.c: Likewise. * kern/sparc64/dl.c: Likewise. * lib/arg.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/bsdXX.c: Likewise. * loader/i386/efi/linux.c: Likewise. * loader/i386/efi/xnu.c: Likewise. * loader/i386/ieee1275/linux.c: Likewise. * loader/i386/linux.c: Likewise. * loader/i386/multiboot.c: Likewise. * loader/i386/pc/linux.c: Likewise. * loader/i386/pc/multiboot2.c: Likewise. * loader/i386/xnu.c: Likewise. * loader/ieee1275/multiboot2.c: Likewise. * loader/macho.c: Likewise. * loader/machoXX.c: Likewise. * loader/multiboot2.c: Likewise. * loader/multiboot_loader.c: Likewise. * loader/powerpc/ieee1275/linux.c: Likewise. * loader/sparc64/ieee1275/linux.c: Likewise. * loader/xnu.c: Likewise. * loader/xnu_resume.c: Likewise. * mmap/i386/pc/mmap.c: Likewise. * normal/menu_viewer.c: Likewise. * partmap/acorn.c: Likewise. * partmap/amiga.c: Likewise. * partmap/apple.c: Likewise. * script/lexer.c: Likewise. * term/gfxterm.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/i386/pc/vga.c: Likewise. * term/ieee1275/ofconsole.c: Likewise. * term/terminfo.c: Likewise. * video/bitmap.c: Likewise. * video/efi_gop.c: Likewise. * video/efi_uga.c: Likewise. * video/fb/video_fb.c: Likewise. * video/i386/pc/vbe.c: Likewise. * video/readers/tga.c: Likewise. * video/video.c: Likewise.
This commit is contained in:
parent
a2c1332b70
commit
7fd0baee0f
83 changed files with 388 additions and 302 deletions
26
kern/elf.c
26
kern/elf.c
|
@ -74,7 +74,7 @@ grub_elf_file (grub_file_t file)
|
|||
!= sizeof (elf->ehdr))
|
||||
{
|
||||
grub_error_push ();
|
||||
grub_error (GRUB_ERR_READ_ERROR, "Cannot read ELF header.");
|
||||
grub_error (GRUB_ERR_READ_ERROR, "cannot read ELF header");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ grub_elf32_load_phdrs (grub_elf_t elf)
|
|||
|| (grub_file_read (elf->file, elf->phdrs, phdrs_size) != phdrs_size))
|
||||
{
|
||||
grub_error_push ();
|
||||
return grub_error (GRUB_ERR_READ_ERROR, "Cannot read program headers");
|
||||
return grub_error (GRUB_ERR_READ_ERROR, "cannot read program headers");
|
||||
}
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
|
@ -200,14 +200,14 @@ grub_elf32_size (grub_elf_t elf)
|
|||
|
||||
if (nr_phdrs == 0)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_OS, "No program headers present");
|
||||
grub_error (GRUB_ERR_BAD_OS, "no program headers present");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (segments_end < segments_start)
|
||||
{
|
||||
/* Very bad addresses. */
|
||||
grub_error (GRUB_ERR_BAD_OS, "Bad program header load addresses");
|
||||
grub_error (GRUB_ERR_BAD_OS, "bad program header load addresses");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -249,7 +249,7 @@ grub_elf32_load (grub_elf_t _elf, grub_elf32_load_hook_t _load_hook,
|
|||
{
|
||||
grub_error_push ();
|
||||
return grub_error (GRUB_ERR_BAD_OS,
|
||||
"Invalid offset in program header.");
|
||||
"invalid offset in program header");
|
||||
}
|
||||
|
||||
if (phdr->p_filesz)
|
||||
|
@ -261,8 +261,8 @@ grub_elf32_load (grub_elf_t _elf, grub_elf32_load_hook_t _load_hook,
|
|||
/* XXX How can we free memory from `load_hook'? */
|
||||
grub_error_push ();
|
||||
return grub_error (GRUB_ERR_BAD_OS,
|
||||
"Couldn't read segment from file: "
|
||||
"wanted 0x%lx bytes; read 0x%lx bytes.",
|
||||
"couldn't read segment from file: "
|
||||
"wanted 0x%lx bytes; read 0x%lx bytes",
|
||||
phdr->p_filesz, read);
|
||||
}
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ grub_elf64_load_phdrs (grub_elf_t elf)
|
|||
|| (grub_file_read (elf->file, elf->phdrs, phdrs_size) != phdrs_size))
|
||||
{
|
||||
grub_error_push ();
|
||||
return grub_error (GRUB_ERR_READ_ERROR, "Cannot read program headers");
|
||||
return grub_error (GRUB_ERR_READ_ERROR, "cannot read program headers");
|
||||
}
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
|
@ -381,14 +381,14 @@ grub_elf64_size (grub_elf_t elf)
|
|||
|
||||
if (nr_phdrs == 0)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_OS, "No program headers present");
|
||||
grub_error (GRUB_ERR_BAD_OS, "no program headers present");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (segments_end < segments_start)
|
||||
{
|
||||
/* Very bad addresses. */
|
||||
grub_error (GRUB_ERR_BAD_OS, "Bad program header load addresses");
|
||||
grub_error (GRUB_ERR_BAD_OS, "bad program header load addresses");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -431,7 +431,7 @@ grub_elf64_load (grub_elf_t _elf, grub_elf64_load_hook_t _load_hook,
|
|||
{
|
||||
grub_error_push ();
|
||||
return grub_error (GRUB_ERR_BAD_OS,
|
||||
"Invalid offset in program header.");
|
||||
"invalid offset in program header");
|
||||
}
|
||||
|
||||
if (phdr->p_filesz)
|
||||
|
@ -443,8 +443,8 @@ grub_elf64_load (grub_elf_t _elf, grub_elf64_load_hook_t _load_hook,
|
|||
/* XXX How can we free memory from `load_hook'? */
|
||||
grub_error_push ();
|
||||
return grub_error (GRUB_ERR_BAD_OS,
|
||||
"Couldn't read segment from file: "
|
||||
"wanted 0x%lx bytes; read 0x%lx bytes.",
|
||||
"couldn't read segment from file: "
|
||||
"wanted 0x%lx bytes; read 0x%lx bytes",
|
||||
phdr->p_filesz, read);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ grub_file_read (grub_file_t file, void *buf, grub_size_t len)
|
|||
if (file->offset > file->size)
|
||||
{
|
||||
grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||
"Attempt to read past the end of file.");
|
||||
"attempt to read past the end of file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ static void grub_claim_heap (void)
|
|||
/* Claim and use it. */
|
||||
if (grub_claimmap (addr, len) < 0)
|
||||
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
|
||||
"Failed to claim heap at 0x%llx, len 0x%llx\n",
|
||||
"failed to claim heap at 0x%llx, len 0x%llx",
|
||||
addr, len);
|
||||
grub_mm_init_region ((void *) (grub_addr_t) addr, len);
|
||||
}
|
||||
|
|
|
@ -44,11 +44,11 @@ grub_machine_mmap_iterate (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uin
|
|||
/* Load `/memory/available'. */
|
||||
if (grub_ieee1275_finddevice ("/memory", &memory))
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
|
||||
"Couldn't find /memory node");
|
||||
"couldn't find /memory node");
|
||||
if (grub_ieee1275_get_integer_property (memory, "available", available,
|
||||
sizeof available, &available_size))
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
|
||||
"Couldn't examine /memory/available property");
|
||||
"couldn't examine /memory/available property");
|
||||
|
||||
/* Decode each entry and call `hook'. */
|
||||
i = 0;
|
||||
|
|
|
@ -308,13 +308,13 @@ grub_ieee1275_parse_args (const char *path, enum grub_ieee1275_parse_type ptype)
|
|||
file path properly. */
|
||||
if (grub_ieee1275_finddevice (device, &dev))
|
||||
{
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Device %s not found\n", device);
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "device %s not found", device);
|
||||
goto fail;
|
||||
}
|
||||
if (grub_ieee1275_get_property (dev, "device_type", &type, sizeof type, 0))
|
||||
{
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE,
|
||||
"Device %s lacks a device_type property\n", device);
|
||||
"device %s lacks a device_type property", device);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
|
|||
Elf_Sword delta = value - (Elf_Word) addr;
|
||||
|
||||
if (delta << 6 >> 6 != delta)
|
||||
return grub_error (GRUB_ERR_BAD_MODULE, "Relocation overflow");
|
||||
return grub_error (GRUB_ERR_BAD_MODULE, "relocation overflow");
|
||||
*addr = (*addr & 0xfc000003) | (delta & 0x3fffffc);
|
||||
break;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
|
|||
|
||||
default:
|
||||
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
|
||||
"This relocation (%d) is not implemented yet",
|
||||
"this relocation (%d) is not implemented yet",
|
||||
ELF_R_TYPE (rel->r_info));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
|
|||
case R_SPARC_32: /* 3 V-word32 */
|
||||
if (value & 0xFFFFFFFF00000000)
|
||||
return grub_error (GRUB_ERR_BAD_MODULE,
|
||||
"Address out of 32 bits range");
|
||||
"address out of 32 bits range");
|
||||
*addr = value;
|
||||
break;
|
||||
case R_SPARC_WDISP30: /* 7 V-disp30 */
|
||||
|
@ -106,7 +106,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
|
|||
(((value - (Elf_Addr) addr) & 0xFFFFFFFF00000000)
|
||||
!= 0xFFFFFFFF00000000))
|
||||
return grub_error (GRUB_ERR_BAD_MODULE,
|
||||
"Displacement out of 30 bits range");
|
||||
"displacement out of 30 bits range");
|
||||
*addr = (*addr & 0xC0000000) |
|
||||
(((grub_int32_t) ((value - (Elf_Addr) addr) >> 2)) &
|
||||
0x3FFFFFFF);
|
||||
|
@ -114,7 +114,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
|
|||
case R_SPARC_HI22: /* 9 V-imm22 */
|
||||
if (((grub_int32_t) value) & 0xFF00000000)
|
||||
return grub_error (GRUB_ERR_BAD_MODULE,
|
||||
"High address out of 22 bits range");
|
||||
"high address out of 22 bits range");
|
||||
*addr = (*addr & 0xFFC00000) | ((value >> 10) & 0x3FFFFF);
|
||||
break;
|
||||
case R_SPARC_LO10: /* 12 T-simm13 */
|
||||
|
@ -131,7 +131,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
|
|||
break;
|
||||
default:
|
||||
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
|
||||
"This relocation (%d) is not implemented yet",
|
||||
"this relocation (%d) is not implemented yet",
|
||||
ELF_R_TYPE (rel->r_info));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue