+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.
}
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;
}
{
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. */
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);
}
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);
{
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;
{
free_tables ();
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
- "Couldn't allocate table structure");
+ "couldn't allocate table structure");
}
table->size = size;
{
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 ();
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);
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)
{
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);
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);
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. */
}
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)
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])
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);
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)
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);
}
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");
/* 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);
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;
{
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;
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)
{
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;
} 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)
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;
}
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;
}
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;
}
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;
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;
}
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;
}
(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;
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;
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)
}
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;
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;
}
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;
}
|| (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;
}
/* 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. */
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;
}
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;
}
else
err = grub_error (GRUB_ERR_READ_ERROR,
- "disk missing.");
+ "disk missing");
k++;
if (k == array->total_devs)
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;
}
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;
}
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, §or_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;
}
{
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");
* 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*/
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 ()))
}
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;
}
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;
}
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;
}
/* 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 */
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;
}
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;
}
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;
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;
}
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],
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;
}
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;
}
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;
}
|| 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;
}
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;
}
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;
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;
&& ! 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
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;
}
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;
}
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);
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--;
}
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;
}
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;
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;
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;
}
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)
{
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;
}
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");
}
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);
{
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;
}
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);
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] -
{
if (copied > COM_LEN)
return grub_error (GRUB_ERR_BAD_FS,
- "Compression block too large");
+ "compression block too large");
if (!bits)
{
if (!copied)
{
- grub_error (GRUB_ERR_BAD_FS, "Context window empty");
+ grub_error (GRUB_ERR_BAD_FS, "nontext window empty");
return 0;
}
{
if (cnt != COM_LEN)
return grub_error (GRUB_ERR_BAD_FS,
- "Invalid compression block size");
+ "invalid compression block size");
}
}
{
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);
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,
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);
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,
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;
}
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;
}
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;
}
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;
}
#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)
!= 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;
}
|| (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;
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;
}
{
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS,
- "Invalid offset in program header.");
+ "invalid offset in program header");
}
if (phdr->p_filesz)
/* 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);
}
}
|| (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;
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;
}
{
grub_error_push ();
return grub_error (GRUB_ERR_BAD_OS,
- "Invalid offset in program header.");
+ "invalid offset in program header");
}
if (phdr->p_filesz)
/* 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);
}
}
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;
}
/* 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);
}
/* 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;
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;
}
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;
}
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));
}
}
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 */
(((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);
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 */
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));
}
}
if (! opt)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
- "Unknown argument `-%c'\n", *curshort);
+ "unknown argument `-%c'", *curshort);
goto fail;
}
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;
}
}
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;
}
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;
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;
}
+ 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);
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;
}
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;
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))
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))
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)
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
if (argc == 0)
{
- grub_error (GRUB_ERR_BAD_ARGUMENT, "No kernel specified");
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
goto fail;
}
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';
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;
}
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)
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;
}
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)
{
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)
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;
}
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;
}
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;
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;
}
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)
{
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;
}
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;
}
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);
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);
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);
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;
}
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;
}
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;
}
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)
{
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;
}
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, 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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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)
{
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;
}
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;
}
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;
}
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;
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;
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)
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,
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",
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;
}
!= 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;
}
{
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;
}
|| 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;
}
(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;
}
}
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;
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,
{
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;
}
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;
}
{
grub_error_push ();
grub_error (GRUB_ERR_BAD_OS,
- "Invalid offset in program header.");
+ "invalid offset in program header");
return 1;
}
/* 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;
}
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, 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;
}
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);
}
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;
}
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;
}
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;
}
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;
}
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;
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);
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);
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;
}
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;
}
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;
}
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;
}
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;
}
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);
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;
}
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;
}
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;
}
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;
}
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;
}
{
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);
{
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);
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);
{
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);
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))
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. */
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,
{
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++)
{
{
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);
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)
{
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);
}
{
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);
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);
!= (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. */
!= (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);
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;
}
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)
{
fail:
return grub_error (GRUB_ERR_BAD_PART_TABLE,
- "Linux/ADFS partition map not found.");
+ "Linux/ADFS partition map not found");
}
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)
fail:
return grub_error (GRUB_ERR_BAD_PART_TABLE,
- "Apple partition map not found.");
+ "Apple partition map not found");
}
{
/* 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;
}
}
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;
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)
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;
}
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;
}
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))
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. */
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]);
}
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)
*bitmap = 0;
return grub_error (GRUB_ERR_BAD_ARGUMENT,
- "Unsupported bitmap format");
+ "unsupported bitmap format");
}
mode_info->pitch = width * mode_info->bytes_per_pixel;
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;
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)
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);
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)
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
|| (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));
{
if (! target->data)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
- "invalid render target given.");
+ "invalid render target given");
render_target = target;
}
/* 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
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. */
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);
}
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)
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)
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);
}
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);
}
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);
}
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);
}
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,
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);
}
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,
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,
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);
}
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 ();
}
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,
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);
}
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);
}
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);
}
grub_free (modevar);
return grub_error (GRUB_ERR_BAD_ARGUMENT,
- "No suitable mode found.");
+ "no suitable mode found");
}
/* Skip separator. */
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
- "Invalid mode: %s\n",
+ "invalid mode: %s",
current_mode);
/* Free memory before returning. */
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
- "Invalid mode: %s\n",
+ "invalid mode: %s",
current_mode);
/* Free memory before returning. */
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
- "Invalid mode: %s\n",
+ "invalid mode: %s",
current_mode);
/* Free memory before returning. */
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
- "Invalid mode: %s\n",
+ "invalid mode: %s",
current_mode);
/* Free memory before returning. */
/* First setup error message. */
rc = grub_error (GRUB_ERR_BAD_ARGUMENT,
- "Invalid mode: %s\n",
+ "invalid mode: %s",
current_mode);
/* Free memory before returning. */
grub_free (modevar);
return grub_error (GRUB_ERR_BAD_ARGUMENT,
- "No suitable mode found.");
+ "no suitable mode found");
}
/* Initialize Video API module. */