read_size = size;
/* Check whether the sector was aligned on a chunk size
- bounday. If this isn't the case, it's the first read
+ boundary. If this isn't the case, it's the first read
and the next read should be set back to start of the
boundary. */
grub_divmod64 (read_sector, array->chunk_size, &i);
read_size = size;
/* Check whether the sector was aligned on a chunk size
- bounday. If this isn't the case, it's the first read
+ boundary. If this isn't the case, it's the first read
and the next read should be set back to start of the
boundary. */
grub_divmod64 (read_sector, array->chunk_size, &i);
#define EXT2_MAGIC 0xEF53
/* Amount of indirect blocks in an inode. */
#define INDIRECT_BLOCKS 12
-/* Maximum lenght of a pathname. */
+/* Maximum length of a pathname. */
#define EXT2_PATH_MAX 4096
/* Maximum nesting of symlinks, used to prevent a loop. */
#define EXT2_MAX_SYMLINKCNT 8
grub_uint32_t dir_blocks[INDIRECT_BLOCKS];
grub_uint32_t indir_block;
grub_uint32_t double_indir_block;
- grub_uint32_t tripple_indir_block;
+ grub_uint32_t triple_indir_block;
} blocks;
char symlink[60];
};
blknr = grub_le_to_cpu32 (indir[rblock % perblock]);
}
- /* Tripple indirect. */
+ /* triple indirect. */
else
{
grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
- "ext2fs doesn't support tripple indirect blocks");
+ "ext2fs doesn't support triple indirect blocks");
blknr = -1;
}
GRUB_HFS_FILETYPE_FILE = 2
};
-/* A node desciptor. This is the header of every node. */
+/* A node descriptor. This is the header of every node. */
struct grub_hfs_node
{
grub_uint32_t next;
blk = grub_hfsplus_find_block (extents, &blksleft);
/* The previous iteration of this loop allocated memory. The
- code above used this memory, it can be free'ed now. */
+ code above used this memory, it can be freed now. */
grub_free (nnode);
nnode = 0;
if (diff)
return diff;
- /* Change the filename in keya so the endianess is correct. */
+ /* Change the filename in keya so the endianness is correct. */
for (i = 0; i < grub_be_to_cpu16 (catkey_a->namelen); i++)
catkey_a->name[i] = grub_be_to_cpu16 (catkey_a->name[i]);
grub_free (filename);
- /* The endianess was changed to host format, change it back to
+ /* The endianness was changed to host format, change it back to
whatever it was. */
for (i = 0; i < grub_be_to_cpu16 (catkey_a->namelen); i++)
catkey_a->name[i] = grub_cpu_to_be16 (catkey_a->name[i]);
/* Lookup the node described by KEY in the B+ Tree BTREE. Compare
keys using the function COMPARE_KEYS. When a match is found,
return the node in MATCHNODE and a pointer to the data in this node
- in KEYOFFSET. MATCHNODE should be free'ed by the caller. */
+ in KEYOFFSET. MATCHNODE should be freed by the caller. */
static grub_err_t
grub_hfsplus_btree_search (struct grub_hfsplus_btree *btree,
struct grub_hfsplus_key_internal *key,
{
grub_uint32_t *pointer;
- /* The place where the key could've been found didn't
+ /* The place where the key could have been found didn't
contain the key. This means that the previous match
is the one that should be followed. */
if (compare_keys (currkey, key) > 0)
/* XXX: It's not documented how to read a label. */
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"reading the label of a HFS+ "
- "partiton is not implemented");
+ "partition is not implemented");
}
\f
/* Test if the SUSP protocol is used on this filesystem. */
if (grub_strncmp ((char *) entry->sig, "SP", 2) == 0)
{
- /* The 2nd data byte stored how many bytes are skipped everytime
+ /* The 2nd data byte stored how many bytes are skipped every time
to get to the SUA (System Usage Area). */
data->susp_skip = entry->data[2];
entry = (struct grub_iso9660_susp_entry *) ((char *) entry + entry->len);
/* Iterate over the entries in the SUA area to detect
- entensions. */
+ extensions. */
if (grub_iso9660_susp_iterate (data,
(grub_le_to_cpu32 (data->voldesc.rootdir.first_sector)
<< GRUB_ISO9660_LOG2_BLKSZ),
{
unsigned int next;
- /* If the inode contains the entrie tree or if this was the last
+ /* If the inode contains the entry tree or if this was the last
node, there is nothing to read. */
if ((diro->inode->file.tree.flags & GRUB_JFS_TREE_LEAF)
|| !grub_le_to_cpu64 (diro->dirpage->header.nextb))
grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
- "ufs does not support tripple indirect blocks");
+ "ufs does not support triple indirect blocks");
return 0;
}
(*reinstall_protocol_interface) (grub_efi_handle_t handle,
grub_efi_guid_t *protocol,
void *old_interface,
- void *new_inteface);
+ void *new_interface);
grub_efi_status_t
(*uninstall_protocol_interface) (grub_efi_handle_t handle,
#define VER_NDX_LORESERVE 0xff00 /* Beginning of reserved entries. */
#define VER_NDX_ELIMINATE 0xff01 /* Symbol is to be eliminated. */
-/* Auxialiary version information. */
+/* Auxiliary version information. */
typedef struct
{
Please refer to VESA BIOS Extension 3.0 Specification for more descriptive
meanings of following structures and how they should be used.
- I have tried to maintain field name comatibility against specification
- while following naming convetions used in GRUB. */
+ I have tried to maintain field name compatibility against specification
+ while following naming conventions used in GRUB. */
typedef grub_uint32_t grub_vbe_farptr_t;
typedef grub_uint32_t grub_vbe_physptr_t;
struct grub_vbe_mode_info_block
{
- /* Mandory information for all VBE revisions. */
+ /* Mandatory information for all VBE revisions. */
grub_uint16_t mode_attributes;
grub_uint8_t win_a_attributes;
grub_uint8_t win_b_attributes;
grub_vbe_farptr_t win_func_ptr;
grub_uint16_t bytes_per_scan_line;
- /* Mandory information for VBE 1.2 and above. */
+ /* Mandatory information for VBE 1.2 and above. */
grub_uint16_t x_resolution;
grub_uint16_t y_resolution;
grub_uint8_t x_char_size;
grub_uint8_t rsvd_field_position;
grub_uint8_t direct_color_mode_info;
- /* Mandory information for VBE 2.0 and above. */
+ /* Mandatory information for VBE 2.0 and above. */
grub_vbe_physptr_t phys_base_addr;
grub_uint32_t reserved2;
grub_uint16_t reserved3;
- /* Mandory information for VBE 3.0 and above. */
+ /* Mandatory information for VBE 3.0 and above. */
grub_uint16_t lin_bytes_per_scan_line;
grub_uint8_t bnk_number_of_image_pages;
grub_uint8_t lin_number_of_image_pages;
grub_uint8_t blue;
grub_uint8_t green;
grub_uint8_t red;
- grub_uint8_t aligment;
+ grub_uint8_t alignment;
} __attribute__ ((packed));
/* Prototypes for kernel real mode thunks. */
unsigned int height;
} viewport;
- /* Indicates wether the data has been allocated by us and must be freed
+ /* Indicates whether the data has been allocated by us and must be freed
when render target is destroyed. */
int is_allocated;
static __inline void
grub_cpu_idle (void)
{
- /* FIXME: this can't work untill we handle interrupts. */
+ /* FIXME: this can't work until we handle interrupts. */
/* __asm__ __volatile__ ("hlt"); */
}
#include <grub/err.h>
#include <grub/types.h>
-/* Video color in hardware dependant format. Users should not assume any
+/* Video color in hardware dependent format. Users should not assume any
specific coding format. */
typedef grub_uint32_t grub_video_color_t;
/* The state stored in filesystem-specific data. */
struct grub_gzio
{
- /* The underlyding file object. */
+ /* The underlying file object. */
grub_file_t file;
- /* The offset at which the data starts in the underlyding file. */
+ /* The offset at which the data starts in the underlying file. */
grub_off_t data_offset;
/* The type of current block. */
int block_type;
unsigned long bb;
/* The bits in the bit buffer. */
unsigned bk;
- /* Ths sliding window in uncompressed data. */
+ /* The sliding window in uncompressed data. */
grub_uint8_t slide[WSIZE];
/* Current position in the slide. */
unsigned wp;
{
unsigned int i = 0;
- /* XXX: This can be done much more effecient. */
+ /* XXX: This can be done much more efficiently. */
while (*s)
i += 5 * *(s++);
* character and the attribute, and restore the current position.
*
* The reason why this is so complicated is that there is no easy way to
- * get the height of the screen, and the TELETYPE OUPUT BIOS call doesn't
+ * get the height of the screen, and the TELETYPE OUTPUT BIOS call doesn't
* support setting a background attribute.
*/
FUNCTION(grub_console_real_putchar)
unsigned long long q = 0;
unsigned m = 0;
- /* Skip the slow computation, if 32-bit arithmetics are possible. */
+ /* Skip the slow computation if 32-bit arithmetic is possible. */
if (n < 0xffffffff)
{
if (r)
r->size = (h->size << GRUB_MM_ALIGN_LOG2);
/* Find where to insert this region. Put a smaller one before bigger ones,
- to prevent fragmentations. */
+ to prevent fragmentation. */
for (p = &base, q = *p; q; p = &(q->next), q = *p)
if (q->size > r->size)
break;
3rd party updates which fix the partition bugs are common, and for
some reason their fixes aren't being merged into trunk. So for
example we know that 1.2 and 1.3 are broken, but there's 1.2.99
- and 1.3.99 which are known good (and appliing this workaround
+ and 1.3.99 which are known good (and applying this workaround
would cause breakage). */
if (!grub_strcmp (tmp, "1.0")
|| !grub_strcmp (tmp, "1.1")
-/* openfw.c -- Open firmware support funtions. */
+/* openfw.c -- Open firmware support functions. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
if (grub_ieee1275_get_property (memory, "available", available,
sizeof available, 0))
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
- "Couldn't examine /memory/available propery");
+ "Couldn't examine /memory/available property");
/* Decode each entry and call `hook'. */
i = 0;
-/* openfw.c -- Open firmware support funtions. */
+/* openfw.c -- Open firmware support functions. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2003,2004,2005,2007 Free Software Foundation, Inc.
return grub_errno;
}
- /* XXX: When this fails, the memory should be free'ed? */
+ /* XXX: When this fails, the memory should be freed? */
return grub_normal_menu_addentry (title, script,
cmd_menuentry->sourcecode);
}
break;
/* If the string is not quoted or escaped, stop processing
- when a special token was found. It will be recognised
+ when a special token was found. It will be recognized
next time when this function is called. */
if (newstate == GRUB_PARSER_STATE_TEXT
&& state->state != GRUB_PARSER_STATE_ESC)
int size;
int orig_num, new_num;
- /* Find a string delimitted by LF. */
+ /* Find a string delimited by LF. */
p = grub_strchr (s, '\n');
if (! p)
p = s + grub_strlen (s);
$$ = grub_script_arg_add (state, 0, GRUB_SCRIPT_ARG_TYPE_STR, $1);
}
/* XXX: Currently disabled to simplify the parser. This should be
- parsed by yet another parser for readibility. */
+ parsed by yet another parser for readability. */
/* | argument GRUB_PARSER_TOKEN_VAR */
/* { */
/* $$ = grub_script_arg_add ($1, GRUB_SCRIPT_ARG_TYPE_VAR, $2); */
change any stuff because it might seem like a fun thing to do!
Special care was take to make sure the mid-rule actions are
executed on the right moment. So the `commands' rule should be
- recognised after executing the `grub_script_mem_record; and before
+ recognized after executing the `grub_script_mem_record; and before
`grub_script_mem_record_stop'. */
function: "function" GRUB_PARSER_TOKEN_NAME
{
grub_script_lexer_ref (state->lexerstate);
} newlines '{'
{
- /* The first part of the function was recognised.
+ /* The first part of the function was recognized.
Now start recording the memory usage to store
this function. */
state->func_mem = grub_script_mem_record (state);
/* It is not possible to deallocate the memory when a syntax error was
found. Because of that it is required to keep track of all memory
- allocations. The memory is free'ed in case of an error, or
+ allocations. The memory is freed in case of an error, or
assigned to the parsed script when parsing was successful. */
/* XXX */
/* In case of the normal malloc, some additional bytes are allocated
for this datastructure. All reserved memory is stored in a linked
- list so it can be easily free'ed. The original memory can be found
+ list so it can be easily freed. The original memory can be found
from &mem. */
struct grub_script_mem
{
cmd = grub_script_malloc (state, sizeof (*cmd));
cmd->cmd.exec = grub_script_execute_menuentry;
cmd->cmd.next = 0;
- /* XXX: Check if this memory is properly free'ed. */
+ /* XXX: Check if this memory is properly freed. */
cmd->sourcecode = sourcecode;
cmd->title = title;
cmd->options = options;
#define LINUX_SWAP_MAGIC grub_cpu_to_le32 (0xdeafab1e)
#define LINUX_MAP_ENTRIES (512 / 12)
-#define NONADFS_PARTITON_TYPE_LINUX 9
-#define NONADFS_PARTITON_TYPE_MASK 15
+#define NONADFS_PARTITION_TYPE_LINUX 9
+#define NONADFS_PARTITION_TYPE_MASK 15
struct grub_acorn_boot_block
{
if (err)
return err;
- if ((boot.flags & NONADFS_PARTITON_TYPE_MASK) != NONADFS_PARTITON_TYPE_LINUX)
+ if ((boot.flags & NONADFS_PARTITION_TYPE_MASK) != NONADFS_PARTITION_TYPE_LINUX)
goto fail;
for (i = 0; i != 0x1ff; ++i)
(char *) &block) == GRUB_ERR_NONE)
{
if (GRUB_PARTMAP_SUN_MAGIC != grub_be_to_cpu16 (block.magic))
- grub_error (GRUB_ERR_BAD_PART_TABLE, "not a sun partiton table");
+ grub_error (GRUB_ERR_BAD_PART_TABLE, "not a sun partition table");
if (! grub_sun_is_valid (&block))
grub_error (GRUB_ERR_BAD_PART_TABLE, "invalid checksum");
/* Maybe another error value would be better, because partition
- table _is_ recognised but invalid. */
+ table _is_ recognized but invalid. */
for (partnum = 0; partnum < GRUB_PARTMAP_SUN_MAX_PARTS; partnum++)
{
struct grub_sun_partition_descriptor *desc;
/* Try out video mode. */
- /* If we have 8 or less bits, then assuem that it is indexed color mode. */
+ /* If we have 8 or less bits, then assume that it is indexed color mode. */
if ((depth <= 8) && (depth != -1))
flags |= GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
{
/* No gfxmode variable set, use defaults. */
- /* If we have 8 or less bits, then assuem that it is indexed color mode. */
+ /* If we have 8 or less bits, then assume that it is indexed color mode. */
if ((depth <= 8) && (depth != -1))
flags |= GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
return -1;
}
-/* Put a chararacter. */
+/* Put a character. */
static void
serial_hw_put (const int c)
{
{
unsigned char status = 0;
- /* Turn off the interupt. */
+ /* Turn off the interrupt. */
grub_outb (0, serial_settings.port + UART_IER);
/* Set DLAB. */
struct grub_virtual_screen
{
- /* Dimensions of the virual screen. */
+ /* Dimensions of the virtual screen. */
grub_uint32_t width;
grub_uint32_t height;
grub_uint8_t fg_color;
grub_uint8_t bg_color;
- /* Text buffer for virual screen. Contains (columns * rows) number
+ /* Text buffer for virtual screen. Contains (columns * rows) number
of entries. */
struct grub_colored_char *text_buffer;
};
virtual_screen.text_buffer[i].index = 0;
}
- /* Scroll frambuffer with one line to up. */
+ /* Scroll framebuffer with one line to up. */
grub_memmove (framebuffer,
framebuffer
+ bytes_per_scan_line * virtual_screen.char_height,
#ifdef __linux__
if (sector == 0 && size > 1)
{
- /* Work around a bug in linux's ez remapping. Linux remaps all
+ /* Work around a bug in Linux ez remapping. Linux remaps all
sectors that are read together with the MBR in one read. It
should only remap the MBR, so we split the read in two
parts. -jochen */
/* First, get defined symbols. */
read_defined_symbols (stdin);
- /* Second, find the dependecies. */
+ /* Second, find the dependencies. */
for (i = 1; i < argc; i++)
{
FILE *fp;
--no-floppy do not probe any floppy drive
--recheck probe a device map even if it already exists
-grub-install copies GRUB images into the DIR/boot directory specfied by
+grub-install copies GRUB images into the DIR/boot directory specified by
--root-directory.
Report bugs to <bug-grub@gnu.org>.
INSTALL_DEVICE can be a GRUB device name or a system device filename.
-grub-install copies GRUB images into the DIR/boot directory specfied by
+grub-install copies GRUB images into the DIR/boot directory specified by
--root-directory, and uses grub-setup to install grub into the boot
sector.
--grub-probe=FILE use FILE as grub-probe
--no-nvram don't update the boot-device NVRAM variable
-grub-install copies GRUB images into the DIR/boot directory specfied by
+grub-install copies GRUB images into the DIR/boot directory specified by
--root-directory, and uses nvsetenv to set the Open Firmware boot-device
variable.
grub-mkdevicemap
fi
-# Device containing our userland. Typicaly used for root= parameter.
+# Device containing our userland. Typically used for root= parameter.
GRUB_DEVICE="`grub-probe --target=device /`"
# Filesystem for the device containing our userland. Used for stuff like
#
# DO NOT EDIT THIS FILE
#
-# It is automaticaly generated by $0 using templates
+# It is automatically generated by $0 using templates
# from ${update_grub_dir} and settings from ${sysconfdir}/default/grub
#
EOF
unsigned int width, unsigned int height)
{
/* Make sure viewport is withing screen dimensions. If viewport was set
- to be out of the reqion, mark its size as zero. */
+ to be out of the region, mark its size as zero. */
if (x > active_mode_info.x_resolution)
{
x = 0;
if ((mode_info->mode_type
& GRUB_VIDEO_MODE_TYPE_INDEX_COLOR) != 0)
{
- /* If we have out of bounds color, return trasnparent black. */
+ /* If we have an out-of-bounds color, return transparent black. */
if (color > 255)
{
*red = 0;
return GRUB_ERR_NONE;
}
-/* NOTE: This function assumes that given coordiantes are within bounds of
+/* NOTE: This function assumes that given coordinates are within bounds of
handled data. */
static void
common_blitter (struct grub_video_i386_vbeblit_info *target,
target->mode_info.bpp = 32;
target->mode_info.bytes_per_pixel = 4;
target->mode_info.pitch = target->mode_info.bytes_per_pixel * width;
- target->mode_info.number_of_colors = 256; /* Emulated paletted. */
+ target->mode_info.number_of_colors = 256; /* Emulated palette. */
target->mode_info.red_mask_size = 8;
target->mode_info.red_field_pos = 0;
target->mode_info.green_mask_size = 8;
ID from end of file, but we really don't care about that as we are
not going to support developer area & extensions at this point. */
- /* Read TGA header from begining of file. */
+ /* Read TGA header from beginning of file. */
if (grub_file_read (file, (char*)&header, sizeof (header))
!= sizeof (header))
{
}
}
- /* If there were loading proble, destroy bitmap. */
+ /* If there was a loading problem, destroy bitmap. */
if (grub_errno != GRUB_ERR_NONE)
{
grub_video_bitmap_destroy (*bitmap);
#include <grub/types.h>
#include <grub/dl.h>
-/* The list of video adapters registerd to system. */
+/* The list of video adapters registered to system. */
static grub_video_adapter_t grub_video_adapter_list;
/* Active video adapter. */
"Can't locate valid adapter for mode");
}
-/* Restore back to initial mode (where applicaple). */
+/* Restore back to initial mode (where applicable). */
grub_err_t
grub_video_restore (void)
{