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:
carles 2009-12-24 23:53:05 +01:00
parent a2c1332b70
commit 7fd0baee0f
83 changed files with 388 additions and 302 deletions

View File

@ -1,3 +1,89 @@
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.
2009-12-23 Felix Zielcke <fzielcke@z-51.de>
* commands/i386/pc/drivemap.c: Remove all trailing whitespace.

View File

@ -50,7 +50,7 @@ grub_usb_hub_add_dev (grub_usb_controller_t controller, grub_usb_speed_t speed)
}
if (i == 128)
{
grub_error (GRUB_ERR_IO, "Can't assign address to USB device");
grub_error (GRUB_ERR_IO, "can't assign address to USB device");
return NULL;
}

View File

@ -277,7 +277,7 @@ grub_acpi_create_ebda (void)
{
grub_mmap_unregister (mmapregion);
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Couldn't find suitable spot in EBDA");
"couldn't find suitable spot in EBDA");
}
/* Remove any other RSDT. */
@ -551,7 +551,7 @@ grub_cmd_acpi (struct grub_extcmd *cmd,
grub_free (exclude);
grub_free (load_only);
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Couldn't allocate table");
"couldn't allocate table");
}
grub_memcpy (table_dsdt, dsdt, dsdt->length);
}
@ -578,7 +578,7 @@ grub_cmd_acpi (struct grub_extcmd *cmd,
grub_free (exclude);
grub_free (load_only);
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Couldn't allocate table structure");
"couldn't allocate table structure");
}
table->size = curtable->length;
table->addr = grub_malloc (table->size);
@ -587,7 +587,7 @@ grub_cmd_acpi (struct grub_extcmd *cmd,
{
free_tables ();
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Couldn't allocate table");
"couldn't allocate table");
}
table->next = acpi_tables;
acpi_tables = table;
@ -674,7 +674,7 @@ grub_cmd_acpi (struct grub_extcmd *cmd,
{
free_tables ();
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Couldn't allocate table structure");
"couldn't allocate table structure");
}
table->size = size;
@ -709,7 +709,7 @@ grub_cmd_acpi (struct grub_extcmd *cmd,
{
free_tables ();
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Couldn't allocate space for ACPI tables");
"couldn't allocate space for ACPI tables");
}
setup_common_tables ();

View File

@ -87,7 +87,7 @@ grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)),
if (! file->device->disk)
return grub_error (GRUB_ERR_BAD_DEVICE,
"this command is available only for disk devices.");
"this command is available only for disk devices");
if (file->device->disk->partition)
part_start = grub_partition_get_start (file->device->disk->partition);

View File

@ -160,7 +160,7 @@ grub_cmd_loadbios (grub_command_t cmd __attribute__ ((unused)),
int size;
if (argc == 0)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "No rom image specified");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "no rom image specified");
if (argc > 1)
{
@ -169,7 +169,7 @@ grub_cmd_loadbios (grub_command_t cmd __attribute__ ((unused)),
return grub_errno;
if (file->size != 4)
grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid int10 dump size");
grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid int10 dump size");
else
grub_file_read (file, (void *) 0x40, 4);
@ -184,7 +184,7 @@ grub_cmd_loadbios (grub_command_t cmd __attribute__ ((unused)),
size = file->size;
if ((size < 0x10000) || (size > 0x40000))
grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid bios dump size");
grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid bios dump size");
else if (enable_rom_area ())
{
grub_file_read (file, (void *) VBIOS_ADDR, size);

View File

@ -308,7 +308,7 @@ install_int13_handler (int noret __attribute__ ((unused)))
GRUB_MACHINE_MEMORY_RESERVED,
GRUB_MMAP_MALLOC_LOW);
if (! handler_base)
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Could not reserve "
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "could not reserve "
"memory for the int13h handler");
/* Copy int13h handler bundle to reserved area. */

View File

@ -328,7 +328,7 @@ grub_cmd_save_env (grub_extcmd_t cmd, int argc, char **args)
}
if (! argc)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "No variable is specified");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "no variable is specified");
file = open_envblk_file ((state[0].set) ? state[0].arg : 0);
if (! file)

View File

@ -41,7 +41,7 @@ grub_cmd_read (grub_extcmd_t cmd, int argc, char **argv)
char buf[sizeof ("XXXXXXXX")];
if (argc != 1)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid number of arguments");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid number of arguments");
addr = grub_strtoul (argv[0], 0, 0);
switch (cmd->cmd->name[sizeof ("read_") - 1])
@ -78,7 +78,7 @@ grub_cmd_write (grub_command_t cmd, int argc, char **argv)
grub_uint32_t mask = 0xffffffff;
if (argc != 2 && argc != 3)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid number of arguments");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid number of arguments");
addr = grub_strtoul (argv[0], 0, 0);
value = grub_strtoul (argv[1], 0, 0);

View File

@ -53,7 +53,7 @@ grub_cmd_password (grub_command_t cmd __attribute__ ((unused)),
char *pass;
if (argc != 2)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Two arguments expected.");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "two arguments expected");
pass = grub_strdup (args[1]);
if (!pass)

View File

@ -71,7 +71,7 @@ grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
sanssmall = grub_font_get ("Helvetica 8");
fixed = grub_font_get ("Fixed 20");
if (! sansbig || ! sans || ! sanssmall || ! fixed)
return grub_error (GRUB_ERR_BAD_FONT, "No font loaded.");
return grub_error (GRUB_ERR_BAD_FONT, "no font loaded");
glyph = grub_font_get_glyph (fixed, '*');
grub_font_draw_glyph (glyph, color, 200 ,0);

View File

@ -675,7 +675,7 @@ grub_ata_open (const char *name, grub_disk_t disk)
}
if (! dev)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't open device");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
if (dev->atapi)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not an ATA harddisk");
@ -775,7 +775,7 @@ grub_atapi_read (struct grub_scsi *scsi,
/* Count of last transfer may be uneven. */
if (! (0 < cnt && cnt <= size - nread && (! (cnt & 1) || cnt == size - nread)))
return grub_error (GRUB_ERR_READ_ERROR, "Invalid ATAPI transfer count");
return grub_error (GRUB_ERR_READ_ERROR, "invalid ATAPI transfer count");
/* Read the data. */
grub_ata_pio_read (dev, buf + nread, cnt);
@ -821,7 +821,7 @@ grub_atapi_open (const char *name, struct grub_scsi *scsi)
grub_dprintf ("ata", "opening ATAPI dev `%s'\n", name);
if (! devfnd)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "No such ATAPI device");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such ATAPI device");
scsi->data = devfnd;

View File

@ -30,7 +30,7 @@ grub_ata_pass_through (grub_disk_t disk,
{
if (disk->dev->id != GRUB_DISK_DEVICE_ATA_ID)
return grub_error (GRUB_ERR_BAD_DEVICE,
"Device not accessed via ata.mod");
"device not accessed via ata.mod");
struct grub_ata_device *dev = (struct grub_ata_device *) disk->data;

View File

@ -107,7 +107,7 @@ grub_dmraid_nv_detect (grub_disk_t disk, struct grub_raid_array *array)
if (sb.version != NV_VERSION)
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"Unknown version: %d.%d", sb.version);
"unknown version: %d.%d", sb.version);
switch (sb.array.raid_level)
{
@ -129,7 +129,7 @@ grub_dmraid_nv_detect (grub_disk_t disk, struct grub_raid_array *array)
default:
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"Unsupported RAID level: %d", sb.array.raid_level);
"unsupported RAID level: %d", sb.array.raid_level);
}
array->number = 0;

View File

@ -67,7 +67,7 @@ grub_nand_open (const char *name, grub_disk_t disk)
} args;
if (! grub_strstr (name, "nand"))
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Not a nand device");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a nand device");
data = grub_malloc (sizeof (*data));
if (! data)
@ -76,7 +76,7 @@ grub_nand_open (const char *name, grub_disk_t disk)
grub_ieee1275_open (name, &dev_ihandle);
if (! dev_ihandle)
{
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't open device");
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
goto fail;
}
@ -89,7 +89,7 @@ grub_nand_open (const char *name, grub_disk_t disk)
if ((IEEE1275_CALL_ENTRY_FN (&args) == -1) || (args.result))
{
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't get block size");
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't get block size");
goto fail;
}
@ -102,7 +102,7 @@ grub_nand_open (const char *name, grub_disk_t disk)
if ((IEEE1275_CALL_ENTRY_FN (&args) == -1) || (args.result))
{
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't get disk size");
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't get disk size");
goto fail;
}
@ -172,7 +172,7 @@ grub_nand_read (grub_disk_t disk, grub_disk_addr_t sector,
args.result = 1;
if ((IEEE1275_CALL_ENTRY_FN (&args) == -1) || (args.result))
return grub_error (GRUB_ERR_READ_ERROR, "Read error");
return grub_error (GRUB_ERR_READ_ERROR, "read error");
ofs = 0;
size -= len;

View File

@ -175,7 +175,7 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
grub_ieee1275_open (op->devpath, &dev_ihandle);
if (! dev_ihandle)
{
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't open device");
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
goto fail;
}
@ -184,20 +184,20 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
if (grub_ieee1275_finddevice (op->devpath, &dev))
{
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't read device properties");
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't read device properties");
goto fail;
}
if (grub_ieee1275_get_property (dev, "device_type", prop, sizeof (prop),
&actual))
{
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't read the device type");
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't read the device type");
goto fail;
}
if (grub_strcmp (prop, "block"))
{
grub_error (GRUB_ERR_BAD_DEVICE, "Not a block device");
grub_error (GRUB_ERR_BAD_DEVICE, "not a block device");
goto fail;
}
@ -244,12 +244,12 @@ grub_ofdisk_read (grub_disk_t disk, grub_disk_addr_t sector,
(int) (pos >> 32), (int) pos & 0xFFFFFFFFUL, &status);
if (status < 0)
return grub_error (GRUB_ERR_READ_ERROR,
"Seek error, can't seek block %llu",
"seek error, can't seek block %llu",
(long long) sector);
grub_ieee1275_read ((grub_ieee1275_ihandle_t) (unsigned long) disk->data,
buf, size * 512UL, &actual);
if (actual != actual)
return grub_error (GRUB_ERR_READ_ERROR, "Read error on block: %llu",
return grub_error (GRUB_ERR_READ_ERROR, "read error on block: %llu",
(long long) sector);
return 0;

View File

@ -56,7 +56,7 @@ delete_loopback (const char *name)
break;
if (! dev)
return grub_error (GRUB_ERR_BAD_DEVICE, "Device not found");
return grub_error (GRUB_ERR_BAD_DEVICE, "device not found");
/* Remove the device from the list. */
*prev = dev->next;
@ -167,7 +167,7 @@ grub_loopback_open (const char *name, grub_disk_t disk)
break;
if (! dev)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Can't open device");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
file = grub_file_open (dev->filename);
if (! file)

View File

@ -95,7 +95,7 @@ grub_lvm_open (const char *name, grub_disk_t disk)
}
if (! lv)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Unknown LVM device %s", name);
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "unknown LVM device %s", name);
disk->has_partitions = 0;
disk->id = lv->number;
@ -188,7 +188,7 @@ grub_lvm_read (grub_disk_t disk, grub_disk_addr_t sector,
size << GRUB_DISK_SECTOR_BITS, buf);
else
err = grub_error (GRUB_ERR_UNKNOWN_DEVICE,
"Physical volume %s not found", pv->name);
"physical volume %s not found", pv->name);
return err;
}
@ -263,7 +263,7 @@ grub_lvm_scan_device (const char *name)
if (dlocn->offset)
{
grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"We don't support multiple LVM data areas");
"we don't support multiple LVM data areas");
goto fail;
}
@ -290,7 +290,7 @@ grub_lvm_scan_device (const char *name)
|| (grub_le_to_cpu32 (mdah->version) != GRUB_LVM_FMTT_VERSION))
{
grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"Unknown LVM metadata header");
"unknown LVM metadata header");
goto fail2;
}

View File

@ -181,7 +181,7 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array)
/* FIXME: Also support version 1.0. */
if (sb.major_version != 0 || sb.minor_version != 90)
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"Unsupported RAID version: %d.%d",
"unsupported RAID version: %d.%d",
sb.major_version, sb.minor_version);
/* FIXME: Check the checksum. */
@ -193,7 +193,7 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array)
if (sb.level != 0 && sb.level != 1 && sb.level != 4 &&
sb.level != 5 && sb.level != 6 && sb.level != 10)
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"Unsupported RAID level: %d", sb.level);
"unsupported RAID level: %d", sb.level);
array->number = sb.md_minor;
array->level = sb.level;

View File

@ -123,7 +123,7 @@ grub_raid_open (const char *name, grub_disk_t disk)
}
if (!array)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Unknown RAID device %s",
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "unknown RAID device %s",
name);
disk->has_partitions = 1;
@ -265,7 +265,7 @@ grub_raid_read (grub_disk_t disk, grub_disk_addr_t sector,
}
else
err = grub_error (GRUB_ERR_READ_ERROR,
"disk missing.");
"disk missing");
k++;
if (k == array->total_devs)

View File

@ -157,7 +157,7 @@ grub_raid6_recover (struct grub_raid_array *array, int disknr, int p,
if (! array->device[q])
{
grub_error (GRUB_ERR_READ_ERROR, "Not enough disk to restore");
grub_error (GRUB_ERR_READ_ERROR, "not enough disk to restore");
goto quit;
}
@ -176,7 +176,7 @@ grub_raid6_recover (struct grub_raid_array *array, int disknr, int p,
if ((! array->device[p]) || (! array->device[q]))
{
grub_error (GRUB_ERR_READ_ERROR, "Not enough disk to restore");
grub_error (GRUB_ERR_READ_ERROR, "not enough disk to restore");
goto quit;
}

View File

@ -337,14 +337,14 @@ grub_scsi_read (grub_disk_t disk, grub_disk_addr_t sector,
unsigned spb = scsi->blocksize >> GRUB_DISK_SECTOR_BITS;
if (! (spb != 0 && (scsi->blocksize & GRUB_DISK_SECTOR_SIZE) == 0))
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"Unsupported SCSI block size");
"unsupported SCSI block size");
grub_uint32_t sector_mod = 0;
sector = grub_divmod64 (sector, spb, &sector_mod);
if (! (sector_mod == 0 && size % spb == 0))
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"Unaligned SCSI read not supported");
"unaligned SCSI read not supported");
size /= spb;
}

View File

@ -214,7 +214,7 @@ grub_efiemu_load_file (const char *filename)
{
grub_file_close (file);
grub_efiemu_unload ();
return grub_error (grub_errno, "Couldn't init memory management");
return grub_error (grub_errno, "couldn't init memory management");
}
grub_dprintf ("efiemu", "mm initialized\n");

View File

@ -67,7 +67,7 @@ grub_efiemu_add_to_mmap (grub_uint64_t start, grub_uint64_t size,
* sizeof (grub_efi_memory_descriptor_t));
if (!efiemu_mmap)
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Not enough space for memory map");
"not enough space for memory map");
}
/* Fill slot*/
@ -622,7 +622,7 @@ grub_efiemu_mm_do_alloc (void)
if (!efiemu_mmap)
{
grub_efiemu_unload ();
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Couldn't initialize mmap");
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't initialize mmap");
}
if ((err = efiemu_alloc_requests ()))

View File

@ -78,8 +78,8 @@ unescape (char *in, char *out, char *outmax, int *len)
}
if (dptr == outmax)
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Too many NVRAM variables for reserved variable space."
" Try increasing EfiEmu.pnvram.size.");
"too many NVRAM variables for reserved variable space."
" Try increasing EfiEmu.pnvram.size");
*len = dptr - out;
return 0;
}
@ -132,8 +132,8 @@ nvram_set (void * data __attribute__ ((unused)))
if (nvramptr - nvram + sizeof (struct efi_variable) > nvramsize)
{
grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Too many NVRAM variables for reserved variable space."
" Try increasing EfiEmu.pnvram.size.");
"too many NVRAM variables for reserved variable space."
" Try increasing EfiEmu.pnvram.size");
return 1;
}
@ -173,7 +173,7 @@ nvram_set (void * data __attribute__ ((unused)))
if (len < 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "Broken UTF-8 in variable name\n");
grub_error (GRUB_ERR_BAD_ARGUMENT, "broken UTF-8 in variable name");
return 1;
}

View File

@ -222,7 +222,7 @@ grub_efiemu_set_virtual_address_map (grub_efi_uintn_t memory_map_size,
/* Ensure that we are called only once */
if (*ptv_relocated)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "EfiEmu is already relocated.");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "EfiEmu is already relocated");
*ptv_relocated = 1;
/* Correct addresses using information supplied by grub */

View File

@ -210,7 +210,7 @@ open_section (grub_file_t file, struct font_file_section *section)
else if (retval < 0)
{
grub_error (GRUB_ERR_BAD_FONT,
"Font format error: can't read section name");
"font format error: can't read section name");
return 1;
}
@ -225,7 +225,7 @@ open_section (grub_file_t file, struct font_file_section *section)
else if (retval < 0)
{
grub_error (GRUB_ERR_BAD_FONT,
"Font format error: can't read section length");
"font format error: can't read section length");
return 1;
}
@ -259,7 +259,7 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct
if ((sect_length % FONT_CHAR_INDEX_ENTRY_SIZE) != 0)
{
grub_error (GRUB_ERR_BAD_FONT,
"Font file format error: character index length %d "
"font file format error: character index length %d "
"is not a multiple of the entry size %d",
sect_length, FONT_CHAR_INDEX_ENTRY_SIZE);
return 1;
@ -294,7 +294,7 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct
if (i != 0 && entry->code <= last_code)
{
grub_error (GRUB_ERR_BAD_FONT,
"Font characters not in ascending order: %u <= %u",
"font characters not in ascending order: %u <= %u",
entry->code, last_code);
return 1;
}
@ -357,7 +357,7 @@ read_section_as_short (struct font_file_section *section, grub_int16_t *value)
if (section->length != 2)
{
grub_error (GRUB_ERR_BAD_FONT,
"Font file format error: section %c%c%c%c length "
"font file format error: section %c%c%c%c length "
"is %d but should be 2",
section->name[0], section->name[1],
section->name[2], section->name[3],
@ -403,7 +403,7 @@ grub_font_load (const char *filename)
if (grub_memcmp (section.name, section_names_file, 4) != 0)
{
grub_error (GRUB_ERR_BAD_FONT,
"Font file format error: 1st section must be FILE");
"font file format error: 1st section must be FILE");
goto fail;
}
@ -413,7 +413,7 @@ grub_font_load (const char *filename)
if (section.length != 4)
{
grub_error (GRUB_ERR_BAD_FONT,
"Font file format error (file type ID length is %d "
"font file format error (file type ID length is %d "
"but should be 4)", section.length);
goto fail;
}
@ -431,7 +431,7 @@ grub_font_load (const char *filename)
if (grub_memcmp (magic, pff2_magic, 4) != 0)
{
grub_error (GRUB_ERR_BAD_FONT, "Invalid font magic %x %x %x %x",
grub_error (GRUB_ERR_BAD_FONT, "invalid font magic %x %x %x %x",
magic[0], magic[1], magic[2], magic[3]);
goto fail;
}
@ -558,7 +558,7 @@ grub_font_load (const char *filename)
|| font->descent == 0)
{
grub_error (GRUB_ERR_BAD_FONT,
"Invalid font file: missing some required data.");
"invalid font file: missing some required data");
goto fail;
}

View File

@ -88,7 +88,7 @@ grub_cpio_find_file (struct grub_cpio_data *data, char **name,
return grub_errno;
if (hd.magic != MAGIC_BCPIO)
return grub_error (GRUB_ERR_BAD_FS, "Invalid cpio archive");
return grub_error (GRUB_ERR_BAD_FS, "invalid cpio archive");
data->size = (((grub_uint32_t) hd.filesize_1) << 16) + hd.filesize_2;
@ -130,7 +130,7 @@ grub_cpio_find_file (struct grub_cpio_data *data, char **name,
}
if (grub_memcmp (hd.magic, MAGIC_USTAR, sizeof (MAGIC_USTAR) - 1))
return grub_error (GRUB_ERR_BAD_FS, "Invalid tar archive");
return grub_error (GRUB_ERR_BAD_FS, "invalid tar archive");
if ((*name = grub_strdup (hd.name)) == NULL)
return grub_errno;

View File

@ -653,7 +653,7 @@ grub_hfsplus_btree_search (struct grub_hfsplus_btree *btree,
btree->nodesize, (char *) node) <= 0)
{
grub_free (node);
return grub_error (GRUB_ERR_BAD_FS, "Couldn't read i-node.");
return grub_error (GRUB_ERR_BAD_FS, "couldn't read i-node");
}
nodedesc = (struct grub_hfsplus_btnode *) node;

View File

@ -832,7 +832,7 @@ grub_iso9660_uuid (grub_device_t device, char **uuid)
&& ! data->voldesc.modified.second[0] && ! data->voldesc.modified.second[1]
&& ! data->voldesc.modified.hundredth[0] && ! data->voldesc.modified.hundredth[1])
{
grub_error (GRUB_ERR_BAD_NUMBER, "No creation date in filesystem to generate UUID.");
grub_error (GRUB_ERR_BAD_NUMBER, "no creation date in filesystem to generate UUID");
*uuid = NULL;
}
else

View File

@ -715,7 +715,7 @@ grub_jfs_lookup_symlink (struct grub_jfs_data *data, int ino)
grub_jfs_find_file (data, symlink);
if (grub_errno)
grub_error (grub_errno, "Can not follow symlink `%s'.", symlink);
grub_error (grub_errno, "can not follow symlink `%s'", symlink);
return grub_errno;
}

View File

@ -311,7 +311,7 @@ grub_minix_lookup_symlink (struct grub_minix_data *data, int ino)
grub_minix_find_file (data, symlink);
if (grub_errno)
grub_error (grub_errno, "Can not follow symlink `%s'.", symlink);
grub_error (grub_errno, "can not follow symlink `%s'", symlink);
return grub_errno;
}

View File

@ -42,7 +42,7 @@ fixup (struct grub_ntfs_data *data, char *buf, int len, char *magic)
ss = u16at (buf, 6) - 1;
if (ss * (int) data->blocksize != len * GRUB_DISK_SECTOR_SIZE)
return grub_error (GRUB_ERR_BAD_FS, "Size not match",
return grub_error (GRUB_ERR_BAD_FS, "size not match",
ss * (int) data->blocksize,
len * GRUB_DISK_SECTOR_SIZE);
pu = buf + u16at (buf, 4);
@ -53,7 +53,7 @@ fixup (struct grub_ntfs_data *data, char *buf, int len, char *magic)
buf += data->blocksize;
pu += 2;
if (u16at (buf, 0) != us)
return grub_error (GRUB_ERR_BAD_FS, "Fixup signature not match");
return grub_error (GRUB_ERR_BAD_FS, "fixup signature not match");
v16at (buf, 0) = v16at (pu, 0);
ss--;
}
@ -147,7 +147,7 @@ find_attr (struct grub_ntfs_attr *at, unsigned char attr)
new_pos += u16at (new_pos, 4);
}
grub_error (GRUB_ERR_BAD_FS,
"Can\'t find 0x%X in attribute list",
"can\'t find 0x%X in attribute list",
(unsigned char) *at->attr_cur);
return NULL;
}
@ -186,7 +186,7 @@ find_attr (struct grub_ntfs_attr *at, unsigned char attr)
if (read_data (at, pa, at->edat_buf, 0, n, 0, 0))
{
grub_error (GRUB_ERR_BAD_FS,
"Fail to read non-resident attribute list");
"fail to read non-resident attribute list");
return NULL;
}
at->attr_nxt = at->edat_buf;
@ -315,7 +315,7 @@ retry:
goto retry;
}
}
return grub_error (GRUB_ERR_BAD_FS, "Run list overflown");
return grub_error (GRUB_ERR_BAD_FS, "run list overflown");
}
run = read_run_data (run + 1, c1, &val, 0); /* length of current VCN */
ctx->curr_vcn = ctx->next_vcn;
@ -369,7 +369,7 @@ read_data (struct grub_ntfs_attr *at, char *pa, char *dest,
if (pa[8] == 0)
{
if (ofs + len > u32at (pa, 0x10))
return grub_error (GRUB_ERR_BAD_FS, "Read out of range");
return grub_error (GRUB_ERR_BAD_FS, "read out of range");
grub_memcpy (dest, pa + u32at (pa, 0x14) + ofs, len);
return 0;
}
@ -383,7 +383,7 @@ read_data (struct grub_ntfs_attr *at, char *pa, char *dest,
if (ctx->flags & RF_COMP)
{
if (!cached)
return grub_error (GRUB_ERR_BAD_FS, "Attribute can\'t be compressed");
return grub_error (GRUB_ERR_BAD_FS, "attribute can\'t be compressed");
if (at->sbuf)
{
@ -502,7 +502,7 @@ read_attr (struct grub_ntfs_attr *at, char *dest, grub_disk_addr_t ofs,
else
ret =
(grub_errno) ? grub_errno : grub_error (GRUB_ERR_BAD_FS,
"Attribute not found");
"attribute not found");
at->attr_cur = save_cur;
return ret;
}
@ -513,7 +513,7 @@ read_mft (struct grub_ntfs_data *data, char *buf, grub_uint32_t mftno)
if (read_attr
(&data->mmft.attr, buf, mftno * ((grub_disk_addr_t) data->mft_size << BLK_SHR),
data->mft_size << BLK_SHR, 0, 0))
return grub_error (GRUB_ERR_BAD_FS, "Read MFT 0x%X fails", mftno);
return grub_error (GRUB_ERR_BAD_FS, "read MFT 0x%X fails", mftno);
return fixup (data, buf, data->mft_size, "FILE");
}
@ -541,7 +541,7 @@ init_file (struct grub_ntfs_file *mft, grub_uint32_t mftno)
pa = locate_attr (&mft->attr, mft, AT_DATA);
if (pa == NULL)
return grub_error (GRUB_ERR_BAD_FS, "No $DATA in MFT 0x%X", mftno);
return grub_error (GRUB_ERR_BAD_FS, "no $DATA in MFT 0x%X", mftno);
if (!pa[8])
mft->size = u32at (pa, 0x10);
@ -664,7 +664,7 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir,
{
if ((cur_pos = find_attr (at, AT_INDEX_ROOT)) == NULL)
{
grub_error (GRUB_ERR_BAD_FS, "No $INDEX_ROOT");
grub_error (GRUB_ERR_BAD_FS, "no $INDEX_ROOT");
goto done;
}
@ -717,7 +717,7 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir,
if (read_data (at, cur_pos, bmp, 0, bitmap_len, 0, 0))
{
grub_error (GRUB_ERR_BAD_FS,
"Fails to read non-resident $BITMAP");
"fails to read non-resident $BITMAP");
goto done;
}
bitmap_len = u32at (cur_pos, 0x30);

View File

@ -28,7 +28,7 @@ static grub_err_t
decomp_nextvcn (struct grub_ntfs_comp *cc)
{
if (cc->comp_head >= cc->comp_tail)
return grub_error (GRUB_ERR_BAD_FS, "Compression block overflown");
return grub_error (GRUB_ERR_BAD_FS, "compression block overflown");
if (grub_disk_read
(cc->disk,
(cc->comp_table[cc->comp_head][1] -
@ -87,7 +87,7 @@ decomp_block (struct grub_ntfs_comp *cc, char *dest)
{
if (copied > COM_LEN)
return grub_error (GRUB_ERR_BAD_FS,
"Compression block too large");
"compression block too large");
if (!bits)
{
@ -112,7 +112,7 @@ decomp_block (struct grub_ntfs_comp *cc, char *dest)
if (!copied)
{
grub_error (GRUB_ERR_BAD_FS, "Context window empty");
grub_error (GRUB_ERR_BAD_FS, "nontext window empty");
return 0;
}
@ -150,7 +150,7 @@ decomp_block (struct grub_ntfs_comp *cc, char *dest)
{
if (cnt != COM_LEN)
return grub_error (GRUB_ERR_BAD_FS,
"Invalid compression block size");
"invalid compression block size");
}
}
@ -187,7 +187,7 @@ read_block (struct grub_ntfs_rlst *ctx, char *buf, int num)
{
if (ctx->comp.comp_head != ctx->comp.comp_tail)
return grub_error (GRUB_ERR_BAD_FS, "Invalid compression block");
return grub_error (GRUB_ERR_BAD_FS, "invalid compression block");
ctx->comp.comp_head = ctx->comp.comp_tail = 0;
ctx->comp.cbuf_vcn = ctx->target_vcn;
ctx->comp.cbuf_ofs = (ctx->comp.spc << BLK_SHR);

View File

@ -998,7 +998,7 @@ grub_reiserfs_open (struct grub_file *file, const char *name)
goto fail;
if (root.block_number == 0)
{
grub_error (GRUB_ERR_BAD_FS, "Unable to find root item");
grub_error (GRUB_ERR_BAD_FS, "unable to find root item");
goto fail; /* Should never happen since checked at mount. */
}
grub_fshelp_find_file (name, &root, &found,
@ -1014,7 +1014,7 @@ grub_reiserfs_open (struct grub_file *file, const char *name)
goto fail;
if (info.block_number == 0)
{
grub_error (GRUB_ERR_BAD_FS, "Unable to find searched item");
grub_error (GRUB_ERR_BAD_FS, "unable to find searched item");
goto fail;
}
entry_version = grub_le_to_cpu16 (info.header.version);
@ -1289,7 +1289,7 @@ grub_reiserfs_dir (grub_device_t device, const char *path,
goto fail;
if (root.block_number == 0)
{
grub_error(GRUB_ERR_BAD_FS, "Root not found");
grub_error(GRUB_ERR_BAD_FS, "root not found");
goto fail;
}
grub_fshelp_find_file (path, &root, &found, grub_reiserfs_iterate_dir,

View File

@ -415,7 +415,7 @@ grub_ufs_lookup_symlink (struct grub_ufs_data *data, int ino)
grub_ufs_find_file (data, symlink);
if (grub_errno)
grub_error (grub_errno, "Can not follow symlink `%s'.", symlink);
grub_error (grub_errno, "can not follow symlink `%s'", symlink);
return grub_errno;
}

View File

@ -222,7 +222,7 @@ grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
return grub_errno;
if (grub_strncmp ((char *) inode->magic, "IN", 2))
return grub_error (GRUB_ERR_BAD_FS, "not a correct XFS inode.\n");
return grub_error (GRUB_ERR_BAD_FS, "not a correct XFS inode");
return 0;
}
@ -273,7 +273,7 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
if (grub_strncmp ((char *) leaf->magic, "BMAP", 4))
{
grub_free (leaf);
grub_error (GRUB_ERR_BAD_FS, "not a correct XFS BMAP node.\n");
grub_error (GRUB_ERR_BAD_FS, "not a correct XFS BMAP node");
return 0;
}

View File

@ -243,7 +243,7 @@ grub_mofile_open (const char *filename)
if (version != 0)
{
grub_error (GRUB_ERR_BAD_FILE_TYPE,
"mo: invalid mo version in file: %s\n", filename);
"mo: invalid mo version in file: %s", filename);
fd_mo = 0;
return 0;
}

View File

@ -22,7 +22,7 @@
#include <grub/i18n.h>
/* Macros for indistinguishibility. */
#define GRUB_ACCESS_DENIED grub_error (GRUB_ERR_ACCESS_DENIED, "Access denied.")
#define GRUB_ACCESS_DENIED grub_error (GRUB_ERR_ACCESS_DENIED, "access denied")
#define GRUB_GET_PASSWORD(string, len) grub_cmdline_get (N_("Enter password:"), \
string, len, \
'*', 0, 0)

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -274,7 +274,7 @@ grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv,
if (! opt)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
"Unknown argument `-%c'\n", *curshort);
"unknown argument `-%c'", *curshort);
goto fail;
}
@ -326,7 +326,7 @@ grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv,
opt = find_long (cmd->options, arg + 2, arglen);
if (! opt)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "Unknown argument `%s'\n", arg);
grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown argument `%s'", arg);
goto fail;
}
}
@ -337,7 +337,7 @@ grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv,
if (! option)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
"Missing mandatory option for `%s'\n", opt->longarg);
"missing mandatory option for `%s'", opt->longarg);
goto fail;
}
@ -359,7 +359,7 @@ grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv,
if (tail == 0 || tail == option || *tail != '\0' || grub_errno)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
"The argument `%s' requires an integer.",
"the argument `%s' requires an integer",
arg);
goto fail;
@ -382,8 +382,8 @@ grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv,
if (option)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
"A value was assigned to the argument `%s' while it "
"doesn't require an argument\n", arg);
"a value was assigned to the argument `%s' while it "
"doesn't require an argument", arg);
goto fail;
}

View File

@ -679,7 +679,7 @@ grub_netbsd_boot (void)
+ sizeof (struct grub_netbsd_btinfo_mmap_header)
+ count * sizeof (struct grub_netbsd_btinfo_mmap_entry)
> grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "No memory for boot info.");
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "no memory for boot info");
curarg = mmap = (struct grub_netbsd_btinfo_mmap_header *) kern_end;
pm = (struct grub_netbsd_btinfo_mmap_entry *) (mmap + 1);
@ -750,10 +750,10 @@ grub_bsd_load_aout (grub_file_t file)
return grub_errno;
if (grub_file_read (file, &ah, sizeof (ah)) != sizeof (ah))
return grub_error (GRUB_ERR_READ_ERROR, "Cannot read the a.out header");
return grub_error (GRUB_ERR_READ_ERROR, "cannot read the a.out header");
if (grub_aout_get_type (&ah) != AOUT_TYPE_AOUT32)
return grub_error (GRUB_ERR_BAD_OS, "Invalid a.out header");
return grub_error (GRUB_ERR_BAD_OS, "invalid a.out header");
entry = ah.aout32.a_entry & 0xFFFFFF;
@ -771,7 +771,7 @@ grub_bsd_load_aout (grub_file_t file)
}
if (load_addr < 0x100000)
return grub_error (GRUB_ERR_BAD_OS, "Load address below 1M");
return grub_error (GRUB_ERR_BAD_OS, "load address below 1M");
kern_start = load_addr;
kern_end = load_addr + ah.aout32.a_text + ah.aout32.a_data;
@ -811,7 +811,7 @@ grub_bsd_elf32_hook (Elf32_Phdr * phdr, grub_addr_t * addr, int *do_load)
if ((paddr < grub_os_area_addr)
|| (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size))
return grub_error (GRUB_ERR_OUT_OF_RANGE, "Address 0x%x is out of range",
return grub_error (GRUB_ERR_OUT_OF_RANGE, "address 0x%x is out of range",
paddr);
if ((!kern_start) || (paddr < kern_start))
@ -842,7 +842,7 @@ grub_bsd_elf64_hook (Elf64_Phdr * phdr, grub_addr_t * addr, int *do_load)
if ((paddr < grub_os_area_addr)
|| (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size))
return grub_error (GRUB_ERR_OUT_OF_RANGE, "Address 0x%x is out of range",
return grub_error (GRUB_ERR_OUT_OF_RANGE, "address 0x%x is out of range",
paddr);
if ((!kern_start) || (paddr < kern_start))
@ -871,7 +871,7 @@ grub_bsd_load_elf (grub_elf_t elf)
is_64bit = 1;
if (! grub_cpuid_has_longmode)
return grub_error (GRUB_ERR_BAD_OS, "Your CPU does not implement AMD64 architecture.");
return grub_error (GRUB_ERR_BAD_OS, "your CPU does not implement AMD64 architecture");
/* FreeBSD has 64-bit entry point. */
if (kernel_type == KERNEL_TYPE_FREEBSD)
@ -887,7 +887,7 @@ grub_bsd_load_elf (grub_elf_t elf)
return grub_elf64_load (elf, grub_bsd_elf64_hook, 0, 0);
}
else
return grub_error (GRUB_ERR_BAD_OS, "Invalid elf");
return grub_error (GRUB_ERR_BAD_OS, "invalid elf");
}
static grub_err_t
@ -902,7 +902,7 @@ grub_bsd_load (int argc, char *argv[])
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No kernel specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
goto fail;
}
@ -1024,14 +1024,14 @@ grub_cmd_openbsd (grub_extcmd_t cmd, int argc, char *argv[])
int unit, part;
if (*(arg++) != 'w' || *(arg++) != 'd')
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only device specifications of form "
"wd<number><lowercase letter> are supported.");
"only device specifications of form "
"wd<number><lowercase letter> are supported");
unit = grub_strtoul (arg, (char **) &arg, 10);
if (! (arg && *arg >= 'a' && *arg <= 'z'))
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only device specifications of form "
"wd<number><lowercase letter> are supported.");
"only device specifications of form "
"wd<number><lowercase letter> are supported");
part = *arg - 'a';
@ -1076,15 +1076,15 @@ grub_cmd_freebsd_loadenv (grub_command_t cmd __attribute__ ((unused)),
if (kernel_type == KERNEL_TYPE_NONE)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"You need to load the kernel first.");
"you need to load the kernel first");
if (kernel_type != KERNEL_TYPE_FREEBSD)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only FreeBSD support environment");
"only FreeBSD support environment");
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No filename");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no filename");
goto fail;
}
@ -1170,15 +1170,15 @@ grub_cmd_freebsd_module (grub_command_t cmd __attribute__ ((unused)),
if (kernel_type == KERNEL_TYPE_NONE)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"You need to load the kernel first.");
"you need to load the kernel first");
if (kernel_type != KERNEL_TYPE_FREEBSD)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only FreeBSD support module");
"only FreeBSD support module");
if (!is_elf_kernel)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only ELF kernel support module");
"only ELF kernel support module");
/* List the current modules if no parameter. */
if (!argc)
@ -1193,7 +1193,7 @@ grub_cmd_freebsd_module (grub_command_t cmd __attribute__ ((unused)),
if (kern_end + file->size > grub_os_area_addr + grub_os_area_size)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "Not enough memory for the module");
grub_error (GRUB_ERR_OUT_OF_RANGE, "not enough memory for the module");
goto fail;
}
@ -1236,15 +1236,15 @@ grub_cmd_freebsd_module_elf (grub_command_t cmd __attribute__ ((unused)),
if (kernel_type == KERNEL_TYPE_NONE)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"You need to load the kernel first.");
"you need to load the kernel first");
if (kernel_type != KERNEL_TYPE_FREEBSD)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only FreeBSD support module");
"only FreeBSD support module");
if (! is_elf_kernel)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Only ELF kernel support module");
"only ELF kernel support module");
/* List the current modules if no parameter. */
if (! argc)

View File

@ -12,7 +12,7 @@ load (grub_file_t file, void *where, grub_off_t off, grub_size_t size)
{
if (PTR_TO_UINT32 (where) + size > grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"Not enough memory for the module");
"not enough memory for the module");
if (grub_file_seek (file, off) == (grub_off_t) -1)
return grub_errno;
if (grub_file_read (file, where, size)
@ -116,7 +116,7 @@ SUFFIX (grub_freebsd_load_elfmodule_obj) (grub_file_t file, int argc,
case SHT_NOBITS:
if (curload + s->sh_size > grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"Not enough memory for the module");
"not enough memory for the module");
grub_memset (UINT_TO_PTR (curload), 0, s->sh_size);
break;
}
@ -185,7 +185,7 @@ SUFFIX (grub_freebsd_load_elfmodule) (grub_file_t file, int argc, char *argv[],
if (module + s->sh_addr + s->sh_size
> grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"Not enough memory for the module");
"not enough memory for the module");
grub_memset (UINT_TO_PTR (module + s->sh_addr), 0, s->sh_size);
break;
}
@ -259,7 +259,7 @@ SUFFIX (grub_freebsd_load_elf_meta) (grub_file_t file, grub_addr_t *kern_end)
if (*kern_end + 4 * sizeof (grub_freebsd_addr_t) + symsize + strsize
> grub_os_area_addr + grub_os_area_size)
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"Not enough memory for kernel symbols");
"not enough memory for kernel symbols");
symstart = curload = ALIGN_UP (*kern_end, sizeof (grub_freebsd_addr_t));
*((grub_freebsd_addr_t *) UINT_TO_PTR (curload)) = symsize;

View File

@ -671,7 +671,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = 0x400 - sizeof (lh);
if (grub_file_read (file, (char *) real_mode_mem + sizeof (lh), len) != len)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -853,7 +853,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = prot_size;
if (grub_file_read (file, (void *) GRUB_LINUX_BZIMAGE_ADDR, len) != len)
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
if (grub_errno == GRUB_ERR_NONE)
{
@ -890,13 +890,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (! loaded)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -966,7 +966,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (grub_file_read (file, initrd_mem, size) != size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}

View File

@ -148,10 +148,10 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
c = grub_efi_locate_protocol (&uga_draw_guid, 0);
if (! c)
return grub_error (GRUB_ERR_IO, "Couldn't find UGADraw");
return grub_error (GRUB_ERR_IO, "couldn't find UGADraw");
if (efi_call_5 (c->get_mode, c, &width, &height, &depth, &rate))
return grub_error (GRUB_ERR_IO, "Couldn't retrieve video mode");
return grub_error (GRUB_ERR_IO, "couldn't retrieve video mode");
grub_printf ("Video mode: %ux%u-%u@%u\n", width, height, depth, rate);
@ -163,7 +163,7 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
grub_efi_set_text_mode (1);
if (! ret)
return grub_error (GRUB_ERR_IO, "Can\'t find frame buffer address\n");
return grub_error (GRUB_ERR_IO, "can\'t find frame buffer address");
grub_printf ("Frame buffer base: 0x%x\n", fb_base);
grub_printf ("Video line length: %d\n", line_len);

View File

@ -211,7 +211,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
kernel_size = prot_size;
if (grub_file_read (file, kernel_addr, prot_size) != (int) prot_size)
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
if (grub_errno == GRUB_ERR_NONE)
grub_loader_set (grub_linux_boot, grub_linux_unload, 1);
@ -242,13 +242,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (! kernel_addr)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -260,7 +260,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (grub_file_read (file, (void *) GRUB_OFW_LINUX_INITRD_ADDR,
initrd_size) != (int) initrd_size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}

View File

@ -673,7 +673,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = 0x400 - sizeof (lh);
if (grub_file_read (file, (char *) real_mode_mem + sizeof (lh), len) != len)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -862,7 +862,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = prot_size;
if (grub_file_read (file, (void *) GRUB_LINUX_BZIMAGE_ADDR, len) != len)
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
if (grub_errno == GRUB_ERR_NONE)
{
@ -897,13 +897,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (! loaded)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -951,7 +951,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (addr < addr_min)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "The initrd is too big");
grub_error (GRUB_ERR_OUT_OF_RANGE, "the initrd is too big");
goto fail;
}
@ -959,7 +959,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (grub_file_read (file, initrd_mem, size) != size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}

View File

@ -226,21 +226,21 @@ grub_multiboot (int argc, char *argv[])
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No kernel specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
goto fail;
}
file = grub_gzfile_open (argv[0], 1);
if (! file)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "Couldn't open file");
grub_error (GRUB_ERR_BAD_ARGUMENT, "couldn't open file");
goto fail;
}
len = grub_file_read (file, buffer, MULTIBOOT_SEARCH);
if (len < 32)
{
grub_error (GRUB_ERR_BAD_OS, "File too small");
grub_error (GRUB_ERR_BAD_OS, "file too small");
goto fail;
}
@ -257,14 +257,14 @@ grub_multiboot (int argc, char *argv[])
if (header == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No multiboot header found");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no multiboot header found");
goto fail;
}
if (header->flags & MULTIBOOT_UNSUPPORTED)
{
grub_error (GRUB_ERR_UNKNOWN_OS,
"Unsupported flag: 0x%x", header->flags);
"unsupported flag: 0x%x", header->flags);
goto fail;
}
@ -408,14 +408,14 @@ grub_module (int argc, char *argv[])
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (!mbi)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
"You need to load the multiboot kernel first");
"you need to load the multiboot kernel first");
goto fail;
}
@ -430,7 +430,7 @@ grub_module (int argc, char *argv[])
if (grub_file_read (file, module, size) != size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}

View File

@ -234,7 +234,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = real_size + GRUB_DISK_SECTOR_SIZE - sizeof (lh);
if (grub_file_read (file, grub_linux_tmp_addr + sizeof (lh), len) != len)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}
@ -265,7 +265,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
len = prot_size;
if (grub_file_read (file, (void *) GRUB_LINUX_BZIMAGE_ADDR, len) != len)
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
if (grub_errno == GRUB_ERR_NONE)
{
@ -299,13 +299,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
goto fail;
}
if (!loaded)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -314,7 +314,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (!(lh->header == grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
&& grub_le_to_cpu16 (lh->version) >= 0x0200))
{
grub_error (GRUB_ERR_BAD_OS, "The kernel is too old for initrd.");
grub_error (GRUB_ERR_BAD_OS, "the kernel is too old for initrd");
goto fail;
}
@ -357,13 +357,13 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (addr < addr_min)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "The initrd is too big");
grub_error (GRUB_ERR_OUT_OF_RANGE, "the initrd is too big");
goto fail;
}
if (grub_file_read (file, (void *) addr, size) != size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}

View File

@ -42,7 +42,7 @@ grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr,
if ((paddr < grub_os_area_addr)
|| (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size))
return grub_error(GRUB_ERR_OUT_OF_RANGE,"Address 0x%x is out of range",
return grub_error(GRUB_ERR_OUT_OF_RANGE,"address 0x%x is out of range",
paddr);
return GRUB_ERR_NONE;
@ -64,7 +64,7 @@ grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr,
if ((paddr < grub_os_area_addr)
|| (paddr + phdr->p_memsz > grub_os_area_addr + grub_os_area_size))
return grub_error (GRUB_ERR_OUT_OF_RANGE, "Address 0x%x is out of range",
return grub_error (GRUB_ERR_OUT_OF_RANGE, "address 0x%x is out of range",
paddr);
return GRUB_ERR_NONE;

View File

@ -527,12 +527,12 @@ grub_cmd_devprop_load (grub_command_t cmd __attribute__ ((unused)),
unsigned i, j;
if (argc != 1)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "File name required. ");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
file = grub_gzfile_open (args[0], 1);
if (! file)
return grub_error (GRUB_ERR_FILE_NOT_FOUND,
"Couldn't load device-propertie dump. ");
"couldn't load device-propertie dump");
size = grub_file_size (file);
buf = grub_malloc (size);
if (!buf)

View File

@ -51,7 +51,7 @@ grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr,
rc = grub_claimmap (phdr->p_paddr, phdr->p_memsz);
if (rc)
return grub_error(GRUB_ERR_OUT_OF_MEMORY, "Couldn't claim %x - %x",
return grub_error(GRUB_ERR_OUT_OF_MEMORY, "couldn't claim %x - %x",
phdr->p_paddr, phdr->p_paddr + phdr->p_memsz);
grub_dprintf ("loader", "Loading segment at 0x%x - 0x%x\n", phdr->p_paddr,
@ -77,7 +77,7 @@ grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr,
rc = grub_claimmap (phdr->p_paddr, phdr->p_memsz);
if (rc)
return grub_error(GRUB_ERR_OUT_OF_MEMORY, "Couldn't claim 0x%lx - 0x%lx",
return grub_error(GRUB_ERR_OUT_OF_MEMORY, "couldn't claim 0x%lx - 0x%lx",
phdr->p_paddr, phdr->p_paddr + phdr->p_memsz);
grub_dprintf ("loader", "Loading segment at 0x%lx - 0x%lx\n",
@ -96,7 +96,7 @@ grub_mb2_arch_module_alloc (grub_size_t size, grub_addr_t *addr)
rc = grub_ieee1275_claim (0, size, MULTIBOOT2_MOD_ALIGN, addr);
if (rc)
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Firmware couldn't allocate memory (size 0x%lx)", size);
"firmware couldn't allocate memory (size 0x%lx)", size);
return GRUB_ERR_NONE;
}

View File

@ -71,7 +71,7 @@ grub_macho_file (grub_file_t file)
!= sizeof (filestart))
{
grub_error_push ();
grub_error (GRUB_ERR_READ_ERROR, "Cannot read Mach-O header.");
grub_error (GRUB_ERR_READ_ERROR, "cannot read Mach-O header");
goto fail;
}
@ -95,7 +95,7 @@ grub_macho_file (grub_file_t file)
{
grub_free (archs);
grub_error_push ();
grub_error (GRUB_ERR_READ_ERROR, "Cannot read Mach-O header.");
grub_error (GRUB_ERR_READ_ERROR, "cannot read Mach-O header");
goto fail;
}

View File

@ -25,13 +25,13 @@ SUFFIX (grub_macho_parse) (grub_macho_t macho)
|| grub_file_read (macho->file, &head, sizeof (head))
!= sizeof(head))
{
grub_error (GRUB_ERR_READ_ERROR, "Cannot read Mach-O header.");
grub_error (GRUB_ERR_READ_ERROR, "cannot read Mach-O header");
macho->offsetXX = -1;
return;
}
if (head.magic != GRUB_MACHO_MAGIC)
{
grub_error (GRUB_ERR_BAD_OS, "Invalid Mach-O " XX "-bit header.");
grub_error (GRUB_ERR_BAD_OS, "invalid Mach-O " XX "-bit header");
macho->offsetXX = -1;
return;
}
@ -49,7 +49,7 @@ SUFFIX (grub_macho_parse) (grub_macho_t macho)
(grub_size_t) macho->cmdsizeXX)
!= (grub_ssize_t) macho->cmdsizeXX)
{
grub_error (GRUB_ERR_READ_ERROR, "Cannot read Mach-O header.");
grub_error (GRUB_ERR_READ_ERROR, "cannot read Mach-O header");
macho->offsetXX = -1;
}
}
@ -66,7 +66,7 @@ grub_macho_cmds_iterate (grub_macho_t macho,
grub_uint8_t *hdrs = macho->cmdsXX;
int i;
if (! macho->cmdsXX)
return grub_error (GRUB_ERR_BAD_OS, "Couldn't find " XX "-bit Mach-O");
return grub_error (GRUB_ERR_BAD_OS, "couldn't find " XX "-bit Mach-O");
for (i = 0; i < macho->ncmdsXX; i++)
{
struct grub_macho_cmd *hdr = (struct grub_macho_cmd *) hdrs;
@ -92,13 +92,13 @@ SUFFIX (grub_macho_readfile) (grub_macho_t macho, void *dest)
grub_ssize_t read;
if (! SUFFIX (grub_macho_contains_macho) (macho))
return grub_error (GRUB_ERR_BAD_OS,
"Couldn't read architecture-specific part");
"couldn't read architecture-specific part");
if (grub_file_seek (macho->file, macho->offsetXX) == (grub_off_t) -1)
{
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS,
"Invalid offset in program header.");
"invalid offset in program header");
}
read = grub_file_read (macho->file, dest,
@ -107,7 +107,7 @@ SUFFIX (grub_macho_readfile) (grub_macho_t macho, void *dest)
{
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS,
"Couldn't read architecture-specific part");
"couldn't read architecture-specific part");
}
return GRUB_ERR_NONE;
}
@ -151,11 +151,11 @@ SUFFIX (grub_macho_size) (grub_macho_t macho, grub_macho_addr_t *segments_start,
grub_macho_cmds_iterate (macho, calcsize, 0);
if (nr_phdrs == 0)
return grub_error (GRUB_ERR_BAD_OS, "No program headers present");
return grub_error (GRUB_ERR_BAD_OS, "no program headers present");
if (*segments_end < *segments_start)
/* Very bad addresses. */
return grub_error (GRUB_ERR_BAD_OS, "Bad program header load addresses");
return grub_error (GRUB_ERR_BAD_OS, "bad program header load addresses");
return GRUB_ERR_NONE;
}
@ -187,7 +187,7 @@ SUFFIX (grub_macho_load) (grub_macho_t macho, char *offset, int flags)
{
grub_error_push ();
grub_error (GRUB_ERR_BAD_OS,
"Invalid offset in program header.");
"invalid offset in program header");
return 1;
}
@ -201,8 +201,8 @@ SUFFIX (grub_macho_load) (grub_macho_t macho, char *offset, int flags)
/* XXX How can we free memory from `load_hook'? */
grub_error_push ();
err=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",
hdr->filesize, read);
return 1;
}

View File

@ -319,14 +319,14 @@ grub_multiboot2 (int argc, char *argv[])
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No kernel specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
goto fail;
}
file = grub_gzfile_open (argv[0], 1);
if (! file)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "Couldn't open file");
grub_error (GRUB_ERR_BAD_ARGUMENT, "couldn't open file");
goto fail;
}
@ -337,7 +337,7 @@ grub_multiboot2 (int argc, char *argv[])
len = grub_file_read (file, buffer, MULTIBOOT2_HEADER_SEARCH);
if (len < 32)
{
grub_error (GRUB_ERR_BAD_OS, "File too small");
grub_error (GRUB_ERR_BAD_OS, "file too small");
goto fail;
}
@ -378,7 +378,7 @@ grub_multiboot2 (int argc, char *argv[])
err = grub_mb2_load_other (file, header);
else
err = grub_error (GRUB_ERR_BAD_OS,
"Need multiboot 2 header to load non-ELF files.");
"need multiboot 2 header to load non-ELF files");
grub_file_close (file);
}
@ -406,20 +406,20 @@ grub_module2 (int argc, char *argv[])
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
return;
}
if (argc == 1)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No module type specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no module type specified");
return;
}
if (entry == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
"You need to load the multiboot kernel first");
"you need to load the multiboot kernel first");
return;
}
@ -437,7 +437,7 @@ grub_module2 (int argc, char *argv[])
modaddr + modsize);
if (grub_file_read (file, (void *) modaddr, modsize) != modsize)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto out;
}

View File

@ -108,14 +108,14 @@ grub_cmd_multiboot_loader (grub_command_t cmd __attribute__ ((unused)),
if (argc == 0)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "No kernel specified");
grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
goto fail;
}
file = grub_gzfile_open (argv[0], 1);
if (! file)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "Couldn't open file");
grub_error (GRUB_ERR_BAD_ARGUMENT, "couldn't open file");
goto fail;
}
@ -126,7 +126,7 @@ grub_cmd_multiboot_loader (grub_command_t cmd __attribute__ ((unused)),
header_multi_ver_found = 2;
else
{
grub_error (GRUB_ERR_BAD_OS, "Multiboot header not found");
grub_error (GRUB_ERR_BAD_OS, "multiboot header not found");
goto fail;
}

View File

@ -75,10 +75,10 @@ grub_linux_release_mem (void)
linux_args = 0;
if (linux_addr && grub_ieee1275_release (linux_addr, linux_size))
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not release memory");
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "can not release memory");
if (initrd_addr && grub_ieee1275_release (initrd_addr, initrd_size))
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not release memory");
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "can not release memory");
linux_addr = 0;
initrd_addr = 0;
@ -128,7 +128,7 @@ grub_linux_load32 (grub_elf_t elf)
break;
}
if (found_addr == -1)
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Could not claim memory.");
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "could not claim memory");
/* Now load the segments into the area we claimed. */
auto grub_err_t offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr, int *do_load);
@ -178,7 +178,7 @@ grub_linux_load64 (grub_elf_t elf)
break;
}
if (found_addr == -1)
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Could not claim memory.");
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "could not claim memory");
/* Now load the segments into the area we claimed. */
auto grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load);
@ -222,7 +222,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
if (elf->ehdr.ehdr32.e_type != ET_EXEC)
{
grub_error (GRUB_ERR_UNKNOWN_OS,
"This ELF file is not of the right type\n");
"this ELF file is not of the right type");
goto out;
}
@ -236,7 +236,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
grub_linux_load64 (elf);
else
{
grub_error (GRUB_ERR_BAD_FILE_TYPE, "Unknown ELF class");
grub_error (GRUB_ERR_BAD_FILE_TYPE, "unknown ELF class");
goto out;
}
@ -297,7 +297,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (!loaded)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -321,7 +321,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (found_addr == -1)
{
grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not claim memory");
grub_error (GRUB_ERR_OUT_OF_MEMORY, "can not claim memory");
goto fail;
}
@ -330,7 +330,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (grub_file_read (file, (void *) addr, size) != size)
{
grub_ieee1275_release (addr, size);
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}

View File

@ -256,12 +256,12 @@ grub_linux_load64 (grub_elf_t elf)
paddr = alloc_phys (linux_size + off);
if (paddr == (grub_addr_t) -1)
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Could not allocate physical memory.");
"could not allocate physical memory");
ret = grub_ieee1275_map_physical (paddr, linux_addr - off,
linux_size + off, IEEE1275_MAP_DEFAULT);
if (ret)
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Could not map physical memory.");
"could not map physical memory");
grub_dprintf ("loader", "Loading linux at vaddr 0x%lx, paddr 0x%lx, size 0x%lx\n",
linux_addr, paddr, linux_size);
@ -317,7 +317,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
if (elf->ehdr.ehdr32.e_type != ET_EXEC)
{
grub_error (GRUB_ERR_UNKNOWN_OS,
"This ELF file is not of the right type\n");
"this ELF file is not of the right type");
goto out;
}
@ -328,7 +328,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
grub_linux_load64 (elf);
else
{
grub_error (GRUB_ERR_BAD_FILE_TYPE, "Unknown ELF class");
grub_error (GRUB_ERR_BAD_FILE_TYPE, "unknown ELF class");
goto out;
}
@ -390,7 +390,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (!loaded)
{
grub_error (GRUB_ERR_BAD_ARGUMENT, "You need to load the kernel first.");
grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
goto fail;
}
@ -405,14 +405,14 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (paddr == (grub_addr_t) -1)
{
grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Could not allocate physical memory.");
"could not allocate physical memory");
goto fail;
}
ret = grub_ieee1275_map_physical (paddr, addr, size, IEEE1275_MAP_DEFAULT);
if (ret)
{
grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Could not map physical memory.");
"could not map physical memory");
goto fail;
}
@ -421,7 +421,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
if (grub_file_read (file, (void *) addr, size) != size)
{
grub_error (GRUB_ERR_FILE_READ_ERROR, "Couldn't read file");
grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
goto fail;
}

View File

@ -365,7 +365,7 @@ grub_cmd_xnu_kernel (grub_command_t cmd __attribute__ ((unused)),
{
grub_macho_close (macho);
return grub_error (GRUB_ERR_BAD_OS,
"Kernel doesn't contain suitable 32-bit architecture");
"kernel doesn't contain suitable 32-bit architecture");
}
err = grub_macho_size32 (macho, &startcode, &endcode, GRUB_MACHO_NOBSS);
@ -463,7 +463,7 @@ grub_cmd_xnu_kernel64 (grub_command_t cmd __attribute__ ((unused)),
{
grub_macho_close (macho);
return grub_error (GRUB_ERR_BAD_OS,
"Kernel doesn't contain suitable 64-bit architecture");
"kernel doesn't contain suitable 64-bit architecture");
}
err = grub_macho_size64 (macho, &startcode, &endcode, GRUB_MACHO_NOBSS);
@ -654,7 +654,7 @@ grub_xnu_load_driver (char *infoplistname, grub_file_t binaryfile)
if (macho)
grub_macho_close (macho);
return grub_error (GRUB_ERR_BAD_OS,
"Extension doesn't contain suitable architecture");
"extension doesn't contain suitable architecture");
}
if (grub_xnu_is_64bit)
machosize = grub_macho_filesize64 (macho);
@ -719,7 +719,7 @@ grub_xnu_load_driver (char *infoplistname, grub_file_t binaryfile)
{
grub_file_close (infoplist);
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS, "Couldn't read file %s: ",
return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s: ",
infoplistname);
}
grub_file_close (infoplist);
@ -763,7 +763,7 @@ grub_cmd_xnu_mkext (grub_command_t cmd __attribute__ ((unused)),
file = grub_gzfile_open (args[0], 1);
if (! file)
return grub_error (GRUB_ERR_FILE_NOT_FOUND,
"Couldn't load driver package");
"couldn't load driver package");
/* Sometimes caches are fat binary. Errgh. */
if (grub_file_read (file, &head, sizeof (head))
@ -773,7 +773,7 @@ grub_cmd_xnu_mkext (grub_command_t cmd __attribute__ ((unused)),
can hardly imagine a valid package shorter than 20 bytes. */
grub_file_close (file);
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS, "Couldn't read file %s", args[0]);
return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", args[0]);
}
/* Find the corresponding architecture. */
@ -786,7 +786,7 @@ grub_cmd_xnu_mkext (grub_command_t cmd __attribute__ ((unused)),
grub_file_close (file);
grub_error_push ();
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
"Couldn't read file %s", args[0]);
"couldn't read file %s", args[0]);
}
if (grub_file_read (file, archs,
@ -795,7 +795,7 @@ grub_cmd_xnu_mkext (grub_command_t cmd __attribute__ ((unused)),
{
grub_free (archs);
grub_error_push ();
return grub_error (GRUB_ERR_READ_ERROR, "Cannot read fat header.");
return grub_error (GRUB_ERR_READ_ERROR, "cannot read fat header");
}
for (i = 0; i < narchs; i++)
{
@ -848,7 +848,7 @@ grub_cmd_xnu_mkext (grub_command_t cmd __attribute__ ((unused)),
{
grub_file_close (file);
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS, "Couldn't read file %s", args[0]);
return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", args[0]);
}
grub_file_close (file);
@ -875,7 +875,7 @@ grub_cmd_xnu_ramdisk (grub_command_t cmd __attribute__ ((unused)),
file = grub_gzfile_open (args[0], 1);
if (! file)
return grub_error (GRUB_ERR_FILE_NOT_FOUND,
"Couldn't load ramdisk");
"couldn't load ramdisk");
err = grub_xnu_align_heap (GRUB_XNU_PAGESIZE);
if (err)
@ -891,7 +891,7 @@ grub_cmd_xnu_ramdisk (grub_command_t cmd __attribute__ ((unused)),
{
grub_file_close (file);
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS, "Couldn't read file %s", args[0]);
return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", args[0]);
}
return grub_xnu_register_memory ("RAMDisk", 0, loadto, size);
}
@ -917,7 +917,7 @@ grub_xnu_check_os_bundle_required (char *plistname, char *osbundlereq,
{
grub_file_close (file);
grub_error_push ();
grub_error (GRUB_ERR_BAD_OS, "Couldn't read file %s", plistname);
grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", plistname);
return 0;
}
@ -927,14 +927,14 @@ grub_xnu_check_os_bundle_required (char *plistname, char *osbundlereq,
{
grub_file_close (file);
grub_error_push ();
grub_error (GRUB_ERR_OUT_OF_MEMORY, "Couldn't read file %s", plistname);
grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't read file %s", plistname);
return 0;
}
if (grub_file_read (file, buf, size) != (grub_ssize_t) (size))
{
grub_file_close (file);
grub_error_push ();
grub_error (GRUB_ERR_BAD_OS, "Couldn't read file %s", plistname);
grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", plistname);
return 0;
}
grub_file_close (file);

View File

@ -109,7 +109,7 @@ grub_xnu_resume (char *imagename)
!= (grub_ssize_t) codesize)
{
grub_file_close (file);
return grub_error (GRUB_ERR_READ_ERROR, "Cannot read resume image.");
return grub_error (GRUB_ERR_READ_ERROR, "cannot read resume image");
}
/* Read image. */
@ -119,7 +119,7 @@ grub_xnu_resume (char *imagename)
!= (grub_ssize_t) hibhead.image_size)
{
grub_file_close (file);
return grub_error (GRUB_ERR_READ_ERROR, "Cannot read resume image.");
return grub_error (GRUB_ERR_READ_ERROR, "cannot read resume image");
}
grub_file_close (file);

View File

@ -179,7 +179,7 @@ malloc_hook (void)
if (! hooktarget)
{
slots_available = 0;
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "No space for mmap hook");
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "no space for mmap hook");
}
return GRUB_ERR_NONE;
}

View File

@ -58,7 +58,7 @@ grub_menu_viewer_show_menu (grub_menu_t menu, int nested)
grub_menu_viewer_t cur = get_current_menu_viewer ();
grub_err_t err1, err2;
if (!cur)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "No menu viewer available.");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "no menu viewer available");
while (1)
{

View File

@ -85,7 +85,7 @@ acorn_partition_map_find (grub_disk_t disk, struct linux_part *m,
fail:
return grub_error (GRUB_ERR_BAD_PART_TABLE,
"Linux/ADFS partition map not found.");
"Linux/ADFS partition map not found");
}

View File

@ -102,7 +102,7 @@ amiga_partition_map_iterate (grub_disk_t disk,
if (next == -1)
return grub_error (GRUB_ERR_BAD_PART_TABLE,
"Amiga partition map not found.");
"Amiga partition map not found");
/* The end of the partition list is marked using "-1". */
while (next != -1)

View File

@ -176,7 +176,7 @@ apple_partition_map_iterate (grub_disk_t disk,
fail:
return grub_error (GRUB_ERR_BAD_PART_TABLE,
"Apple partition map not found.");
"Apple partition map not found");
}

View File

@ -389,7 +389,7 @@ grub_script_yylex (union YYSTYPE *yylval, struct grub_parser_param *parsestate)
{
/* There is either text or a variable name. In the case you
arrive here there is a serious problem with the lexer. */
grub_error (GRUB_ERR_BAD_ARGUMENT, "Internal error\n");
grub_error (GRUB_ERR_BAD_ARGUMENT, "internal error");
return 0;
}
}

View File

@ -189,7 +189,7 @@ grub_virtual_screen_setup (unsigned int x, unsigned int y,
virtual_screen.font = grub_font_get (font_name);
if (!virtual_screen.font)
return grub_error (GRUB_ERR_BAD_FONT,
"No font loaded.");
"no font loaded");
virtual_screen.width = width;
virtual_screen.height = height;
virtual_screen.offset_x = x;

View File

@ -498,7 +498,7 @@ grub_cmd_serial (grub_extcmd_t cmd,
unit = grub_strtoul (state[0].arg, 0, 0);
serial_settings.port = serial_hw_get_port (unit);
if (!serial_settings.port)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad unit number.");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad unit number");
}
if (state[1].set)

View File

@ -163,7 +163,7 @@ grub_vga_mod_init (void)
set_start_address (PAGE_OFFSET (page));
font = grub_font_get (""); /* Choose any font, for now. */
if (!font)
return grub_error (GRUB_ERR_BAD_FONT, "No font loaded.");
return grub_error (GRUB_ERR_BAD_FONT, "no font loaded");
return GRUB_ERR_NONE;
}

View File

@ -346,7 +346,7 @@ grub_ofconsole_init_input (void)
if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "stdin", &stdin_ihandle,
sizeof stdin_ihandle, &actual)
|| actual != sizeof stdin_ihandle)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Cannot find stdin");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot find stdin");
return 0;
}
@ -365,7 +365,7 @@ grub_ofconsole_init_output (void)
if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "stdout", &stdout_ihandle,
sizeof stdout_ihandle, &actual)
|| actual != sizeof stdout_ihandle)
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Cannot find stdout");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot find stdout");
/* Initialize colors. */
if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS))

View File

@ -103,7 +103,7 @@ grub_terminfo_set_current (const char *str)
return grub_errno;
}
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown terminfo type.");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown terminfo type");
}
/* Wrapper for grub_putchar to write strings. */
@ -168,7 +168,7 @@ grub_cmd_terminfo (grub_command_t cmd __attribute__ ((unused)),
return GRUB_ERR_NONE;
}
else if (argc != 1)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "too many parameters.");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "too many parameters");
else
return grub_terminfo_set_current (args[0]);
}

View File

@ -58,12 +58,12 @@ grub_video_bitmap_create (struct grub_video_bitmap **bitmap,
unsigned int size;
if (!bitmap)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid argument.");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
*bitmap = 0;
if (width == 0 || height == 0)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid argument.");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
*bitmap = (struct grub_video_bitmap *)grub_malloc (sizeof (struct grub_video_bitmap));
if (! *bitmap)
@ -129,7 +129,7 @@ grub_video_bitmap_create (struct grub_video_bitmap **bitmap,
*bitmap = 0;
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Unsupported bitmap format");
"unsupported bitmap format");
}
mode_info->pitch = width * mode_info->bytes_per_pixel;
@ -188,7 +188,7 @@ grub_video_bitmap_load (struct grub_video_bitmap **bitmap,
grub_video_bitmap_reader_t reader = bitmap_readers_list;
if (!bitmap)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid argument.");
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
*bitmap = 0;

View File

@ -137,7 +137,7 @@ grub_video_gop_fill_mode_info (struct grub_efi_gop_mode_info *in,
out->bpp = grub_video_gop_get_bpp (in);
out->bytes_per_pixel = out->bpp >> 3;
if (!out->bpp)
return grub_error (GRUB_ERR_IO, "Unsupported video mode");
return grub_error (GRUB_ERR_IO, "unsupported video mode");
out->pitch = in->pixels_per_scanline * out->bytes_per_pixel;
switch (in->pixel_format)
@ -176,7 +176,7 @@ grub_video_gop_fill_mode_info (struct grub_efi_gop_mode_info *in,
break;
default:
return grub_error (GRUB_ERR_IO, "Unsupported video mode");
return grub_error (GRUB_ERR_IO, "unsupported video mode");
}
out->blit_format = grub_video_get_blit_format (out);
@ -266,7 +266,7 @@ grub_video_gop_setup (unsigned int width, unsigned int height,
if (!found)
{
grub_dprintf ("video", "GOP: no mode found\n");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found.");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
}
if (best_mode != gop->mode->mode)

View File

@ -266,7 +266,7 @@ grub_video_uga_setup (unsigned int width, unsigned int height,
return err;
}
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found.");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
}
static grub_err_t

View File

@ -1048,7 +1048,7 @@ grub_video_fb_create_render_target (struct grub_video_fbrender_target **result,
|| (width == 0)
|| (height == 0))
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"invalid argument given.");
"invalid argument given");
/* Allocate memory for render target. */
target = grub_malloc (sizeof (struct grub_video_fbrender_target));
@ -1168,7 +1168,7 @@ grub_video_fb_set_active_render_target (struct grub_video_fbrender_target *targe
{
if (! target->data)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"invalid render target given.");
"invalid render target given");
render_target = target;

View File

@ -500,7 +500,7 @@ grub_video_vbe_setup (unsigned int width, unsigned int height,
}
/* Couldn't found matching mode. */
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found.");
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
}
static grub_err_t

View File

@ -370,7 +370,7 @@ grub_video_reader_tga (struct grub_video_bitmap **bitmap,
default:
grub_file_close (file);
return grub_error (GRUB_ERR_BAD_FILE_TYPE,
"Unsupported bitmap format (unknown encoding).");
"unsupported bitmap format (unknown encoding)");
}
/* Check that bitmap depth is supported. */
@ -387,7 +387,7 @@ grub_video_reader_tga (struct grub_video_bitmap **bitmap,
default:
grub_file_close (file);
return grub_error (GRUB_ERR_BAD_FILE_TYPE,
"Unsupported bitmap format (bpp=%d).",
"unsupported bitmap format (bpp=%d)",
header.image_bpp);
}

View File

@ -81,7 +81,7 @@ grub_err_t
grub_video_get_info (struct grub_video_mode_info *mode_info)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
/* If mode_info is NULL just report that video adapter is active. */
if (! mode_info)
@ -101,7 +101,7 @@ grub_video_get_info_and_fini (struct grub_video_mode_info *mode_info,
grub_err_t err;
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
err = grub_video_adapter_active->get_info_and_fini (mode_info, framebuffer);
if (err)
@ -209,7 +209,7 @@ grub_video_set_palette (unsigned int start, unsigned int count,
struct grub_video_palette_data *palette_data)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->set_palette (start, count, palette_data);
}
@ -220,7 +220,7 @@ grub_video_get_palette (unsigned int start, unsigned int count,
struct grub_video_palette_data *palette_data)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->get_palette (start, count, palette_data);
}
@ -231,7 +231,7 @@ grub_video_set_viewport (unsigned int x, unsigned int y,
unsigned int width, unsigned int height)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->set_viewport (x, y, width, height);
}
@ -242,7 +242,7 @@ grub_video_get_viewport (unsigned int *x, unsigned int *y,
unsigned int *width, unsigned int *height)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->get_viewport (x, y, width, height);
}
@ -285,7 +285,7 @@ grub_video_unmap_color (grub_video_color_t color, grub_uint8_t *red,
grub_uint8_t *alpha)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->unmap_color (color,
red,
@ -300,7 +300,7 @@ grub_video_fill_rect (grub_video_color_t color, int x, int y,
unsigned int width, unsigned int height)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->fill_rect (color, x, y, width, height);
}
@ -313,7 +313,7 @@ grub_video_blit_bitmap (struct grub_video_bitmap *bitmap,
unsigned int width, unsigned int height)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->blit_bitmap (bitmap, oper, x, y,
offset_x, offset_y,
@ -328,7 +328,7 @@ grub_video_blit_render_target (struct grub_video_render_target *target,
unsigned int width, unsigned int height)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->blit_render_target (target, oper, x, y,
offset_x, offset_y,
@ -340,7 +340,7 @@ grub_err_t
grub_video_scroll (grub_video_color_t color, int dx, int dy)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->scroll (color, dx, dy);
}
@ -350,7 +350,7 @@ grub_err_t
grub_video_swap_buffers (void)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->swap_buffers ();
}
@ -362,7 +362,7 @@ grub_video_create_render_target (struct grub_video_render_target **result,
unsigned int mode_type)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->create_render_target (result,
width, height,
@ -374,7 +374,7 @@ grub_err_t
grub_video_delete_render_target (struct grub_video_render_target *target)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->delete_render_target (target);
}
@ -384,7 +384,7 @@ grub_err_t
grub_video_set_active_render_target (struct grub_video_render_target *target)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->set_active_render_target (target);
}
@ -394,7 +394,7 @@ grub_err_t
grub_video_get_active_render_target (struct grub_video_render_target **target)
{
if (! grub_video_adapter_active)
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
return grub_video_adapter_active->get_active_render_target (target);
}
@ -460,7 +460,7 @@ grub_video_set_mode (const char *modestring,
grub_free (modevar);
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"No suitable mode found.");
"no suitable mode found");
}
/* Skip separator. */
@ -545,7 +545,7 @@ grub_video_set_mode (const char *modestring,
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
"Invalid mode: %s\n",
"invalid mode: %s",
current_mode);
/* Free memory before returning. */
@ -564,7 +564,7 @@ grub_video_set_mode (const char *modestring,
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
"Invalid mode: %s\n",
"invalid mode: %s",
current_mode);
/* Free memory before returning. */
@ -585,7 +585,7 @@ grub_video_set_mode (const char *modestring,
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
"Invalid mode: %s\n",
"invalid mode: %s",
current_mode);
/* Free memory before returning. */
@ -607,7 +607,7 @@ grub_video_set_mode (const char *modestring,
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
"Invalid mode: %s\n",
"invalid mode: %s",
current_mode);
/* Free memory before returning. */
@ -625,7 +625,7 @@ grub_video_set_mode (const char *modestring,
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
"Invalid mode: %s\n",
"invalid mode: %s",
current_mode);
/* Free memory before returning. */
@ -709,7 +709,7 @@ grub_video_set_mode (const char *modestring,
grub_free (modevar);
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"No suitable mode found.");
"no suitable mode found");
}
/* Initialize Video API module. */