skip_name_string (const grub_uint8_t *ptr, const grub_uint8_t *end)
{
const grub_uint8_t *ptr0 = ptr;
-
+
while (ptr < end && (*ptr == '^' || *ptr == '\\'))
ptr++;
switch (*ptr)
grub_uint8_t *scope, int scope_len)
{
grub_uint8_t *prev = table;
-
+
if (!ptr)
ptr = table + sizeof (struct grub_acpi_table_header);
while (ptr < end && prev < ptr)
}
default:
grub_printf ("Unknown opcode 0x%x\n", *ptr);
- return -1;
+ return -1;
}
}
grub_uint32_t tmrel = cur->tp - last_time;
last_time = cur->tp;
- grub_printf ("%3d.%03ds %2d.%03ds %s:%d %s\n",
+ grub_printf ("%3d.%03ds %2d.%03ds %s:%d %s\n",
tmabs / 1000, tmabs % 1000, tmrel / 1000, tmrel % 1000, cur->file, cur->line,
cur->msg);
}
hits, misses);
}
else
- grub_printf ("%s\n", _("No disk cache statistics available\n"));
+ grub_printf ("%s\n", _("No disk cache statistics available\n"));
return 0;
}
|| grub_isspace (code)) && code != '\r')
{
grub_printf ("%C", code);
- count = 0;
+ count = 0;
code = 0;
utcount = 0;
continue;
if (dos && code == '\r')
{
is_0d = 1;
- count = 0;
+ count = 0;
code = 0;
utcount = 0;
continue;
for (j = 0; j < utcount; j++)
grub_printf ("<%x>", (unsigned int) utbuf[j]);
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
- count = 0;
+ count = 0;
code = 0;
utcount = 0;
}
if (newline)
grub_printf ("\n");
- grub_refresh ();
+ grub_refresh ();
return 0;
}
{
grub_efi_guid_t guid;
const char *name;
-} known_protocols[] =
+} known_protocols[] =
{
{ GRUB_EFI_DISK_IO_GUID, "disk" },
{ GRUB_EFI_BLOCK_IO_GUID, "block" },
{
grub_efi_uint64_t size;
grub_efi_uint64_t attr;
- static const char types_str[][9] =
+ static const char types_str[][9] =
{
- "reserved",
+ "reserved",
"ldr-code",
"ldr-data",
"BS-code ",
grub_printf ("%s ", types_str[desc->type]);
else
grub_printf ("Unk %02x ", desc->type);
-
+
grub_printf (" %016" PRIxGRUB_UINT64_T "-%016" PRIxGRUB_UINT64_T
" %08" PRIxGRUB_UINT64_T,
desc->physical_start,
char *vendor;
grub_uint16_t *vendor_utf16;
grub_printf ("Vendor: ");
-
+
for (vendor_utf16 = st->firmware_vendor; *vendor_utf16; vendor_utf16++);
/* Allocate extra 3 bytes to simplify math. */
vendor = grub_calloc (4, vendor_utf16 - st->firmware_vendor + 1);
t->vendor_guid.data3);
for (j = 0; j < 8; j++)
grub_printf ("%02x", t->vendor_guid.data4[j]);
-
+
for (j = 0; j < ARRAY_SIZE (guid_mappings); j++)
if (grub_memcmp (&guid_mappings[j].guid, &t->vendor_guid,
sizeof (grub_efi_guid_t)) == 0)
GRUB_MOD_INIT(lsefisystab)
{
- cmd = grub_register_command ("lsefisystab", grub_cmd_lsefisystab,
+ cmd = grub_register_command ("lsefisystab", grub_cmd_lsefisystab,
"", "Display EFI system tables.");
}
GRUB_MOD_INIT(halt)
{
cmd = grub_register_command ("halt", grub_cmd_halt,
- 0, N_("Halts the computer. This command does"
+ 0, N_("Halts the computer. This command does"
" not work on all firmware implementations."));
}
{0, 0, 0, 0, 0, 0}
};
-static struct { const char *name; const char *hashname; } aliases[] =
+static struct { const char *name; const char *hashname; } aliases[] =
{
{"sha256sum", "sha256"},
{"sha512sum", "sha512"},
hashlist = grub_file_open (hashfilename, GRUB_FILE_TYPE_HASHLIST);
if (!hashlist)
return grub_errno;
-
+
while (grub_free (buf), (buf = grub_file_getline (hashlist)))
{
const char *p = buf;
if (prefix)
{
char *filename;
-
+
filename = grub_xasprintf ("%s/%s", prefix, p);
if (!filename)
{
"hash of '%s' mismatches", p);
}
mismatch++;
- continue;
+ continue;
}
grub_printf_ (N_("%s: OK\n"), p);
}
grub_disk_close (disk);
return grub_error (GRUB_ERR_IO, "not an ATA device");
}
-
+
/* Change settings. */
if (aam >= 0)
stringwidth = 0;
- while (unicode_last_screen_position < unicode_last_position &&
+ while (unicode_last_screen_position < unicode_last_position &&
stringwidth < ((grub_term_width (term) / 2) - 2))
{
struct grub_unicode_glyph glyph;
- unicode_last_screen_position
+ unicode_last_screen_position
+= grub_unicode_aglomerate_comb (unicode_last_screen_position,
unicode_last_position
- unicode_last_screen_position,
if (cnt % 2)
grub_printf ("\n");
cnt++;
-
+
grub_free (command_help);
grub_free (unicode_command_help);
}
grub_uint32_t tmrel = tsc2ms (ts_table->entries[i].tsc - last_tsc);
last_tsc = ts_table->entries[i].tsc;
- grub_printf ("%3d.%03ds %2d.%03ds %02d %s\n",
+ grub_printf ("%3d.%03ds %2d.%03ds %02d %s\n",
tmabs / 1000, tmabs % 1000, tmrel / 1000, tmrel % 1000,
ts_table->entries[i].id,
(ts_table->entries[i].id < ARRAY_SIZE (descs)
grub_printf (": %dx%dx%d pitch=%d lfb=0x%llx %d/%d/%d/%d %d/%d/%d/%d",
fb->width, fb->height,
- fb->bpp, fb->pitch,
+ fb->bpp, fb->pitch,
(unsigned long long) fb->lfb,
fb->red_mask_size, fb->green_mask_size,
fb->blue_mask_size, fb->reserved_mask_size,
return GRUB_ERR_NONE;
}
- /* TRANSLATORS: This is the header of mapping list.
+ /* TRANSLATORS: This is the header of mapping list.
On the left is how OS will see the disks and
on the right current GRUB vision. */
grub_puts_ (N_("OS disk #num ------> GRUB/BIOS device"));
regs.ebx = 0;
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
grub_bios_interrupt (0x15, ®s);
-
+
if (regs.flags & GRUB_CPU_INT_FLAGS_CARRY)
stop ();
regs.ebx = 0;
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
grub_bios_interrupt (0x15, ®s);
-
+
if (regs.flags & GRUB_CPU_INT_FLAGS_CARRY)
return 0;
info->version = regs.eax & 0xffff;
{
if (argc < 1)
- return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
/* TRANSLATORS: It's musical notes, not the notes
you take. Play command expects arguments which can
be either a filename or tempo+notes.
{"no-led", 0, 0, N_("don't update LED state"), 0, 0},
{0, 0, 0, 0, 0, 0}
};
-static int simple_flag_offsets[]
+static int simple_flag_offsets[]
= {5, 6, 4, 7, 11, 1, 0, 10, 13, 14, 12, 15, 9, 3, 8, 2};
static grub_uint32_t andmask = 0xffffffff, ormask = 0;
-struct
+struct
keysym
{
const char *unshifted_name; /* the name in unshifted state */
{"right", 0, 0xe0, 0, 0x4d}
};
-/* Set a simple flag in flags variable
+/* Set a simple flag in flags variable
OUTOFFSET - offset of flag in FLAGS,
OP - action id
*/
static void
grub_sendkey_set_simple_flag (int outoffset, int op)
-{
+{
if (op == 2)
{
andmask |= (1 << outoffset);
if (! state.set)
return 2;
- if (grub_strcmp (state.arg, "off") == 0 || grub_strcmp (state.arg, "0") == 0
+ if (grub_strcmp (state.arg, "off") == 0 || grub_strcmp (state.arg, "0") == 0
|| grub_strcmp (state.arg, "unpress") == 0)
return 0;
grub_uint32_t *flags = (grub_uint32_t *) 0x417;
oldflags = *flags;
-
+
/* Set the sendkey. */
*((char *) 0x41a) = 0x1e;
*((char *) 0x41c) = keylen + 0x1e;
/* Transform "any alt" to "right alt" flag. */
if (*flags & (1 << 9))
*flags &= ~(1 << 3);
-
+
*flags = (*flags & andmask) | ormask;
/* Transform "right ctrl" to "any ctrl" flag. */
for (i = 0; i < ARRAY_SIZE(keysym_table); i++)
{
- if (keysym_table[i].unshifted_name
+ if (keysym_table[i].unshifted_name
&& grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
return keysym_table[i].keycode;
- else if (keysym_table[i].shifted_name
+ else if (keysym_table[i].shifted_name
&& grub_strcmp (key, keysym_table[i].shifted_name) == 0)
return keysym_table[i].keycode;
}
for (i = 0; i < ARRAY_SIZE(keysym_table); i++)
{
- if (keysym_table[i].unshifted_name
+ if (keysym_table[i].unshifted_name
&& grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
return keysym_table[i].unshifted_ascii;
- else if (keysym_table[i].shifted_name
+ else if (keysym_table[i].shifted_name
&& grub_strcmp (key, keysym_table[i].shifted_name) == 0)
return keysym_table[i].shifted_ascii;
}
for (i = 0; i < argc && keylen < 0x20; i++)
{
int key_code;
-
+
key_code = find_key_code (args[i]);
if (key_code)
{
{
unsigned i;
for (i = 0; i < ARRAY_SIZE(simple_flag_offsets); i++)
- grub_sendkey_set_simple_flag (simple_flag_offsets[i],
+ grub_sendkey_set_simple_flag (simple_flag_offsets[i],
grub_sendkey_parse_op(state[i]));
}
keypresses. */
N_("Emulate a keystroke sequence"), options);
- preboot_hook
- = grub_loader_register_preboot_hook (grub_sendkey_preboot,
+ preboot_hook
+ = grub_loader_register_preboot_hook (grub_sendkey_preboot,
grub_sendkey_postboot,
GRUB_LOADER_PREBOOT_HOOK_PRIO_CONSOLE);
}
/* Keyboard errors. Handled by driver. */
/* 0x00 */ 0, 0, 0, 0,
- /* 0x04 */ 'a', 'b', 'c', 'd',
+ /* 0x04 */ 'a', 'b', 'c', 'd',
/* 0x08 */ 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
/* 0x10 */ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
/* 0x18 */ 'u', 'v', 'w', 'x', 'y', 'z', '1', '2',
/* 0x28 */ '\n', GRUB_TERM_ESC, GRUB_TERM_BACKSPACE, GRUB_TERM_TAB, ' ', '-', '=', '[',
/* According to usage table 0x31 should be mapped to '/'
but testing with real keyboard shows that 0x32 is remapped to '/'.
- Map 0x31 to 0.
+ Map 0x31 to 0.
*/
/* 0x30 */ ']', 0, '\\', ';', '\'', '`', ',', '.',
/* 0x39 is CapsLock. Handled by driver. */
- /* 0x38 */ '/', 0, GRUB_TERM_KEY_F1, GRUB_TERM_KEY_F2,
+ /* 0x38 */ '/', 0, GRUB_TERM_KEY_F1, GRUB_TERM_KEY_F2,
/* 0x3c */ GRUB_TERM_KEY_F3, GRUB_TERM_KEY_F4,
/* 0x3e */ GRUB_TERM_KEY_F5, GRUB_TERM_KEY_F6,
/* 0x40 */ GRUB_TERM_KEY_F7, GRUB_TERM_KEY_F8,
/* PrtScr and ScrollLock. Not handled yet. */
/* 0x46 */ 0, 0,
/* 0x48 is Pause. Not handled yet. */
- /* 0x48 */ 0, GRUB_TERM_KEY_INSERT,
+ /* 0x48 */ 0, GRUB_TERM_KEY_INSERT,
/* 0x4a */ GRUB_TERM_KEY_HOME, GRUB_TERM_KEY_PPAGE,
/* 0x4c */ GRUB_TERM_KEY_DC, GRUB_TERM_KEY_END,
/* 0x4e */ GRUB_TERM_KEY_NPAGE, GRUB_TERM_KEY_RIGHT,
/* 0x50 */ GRUB_TERM_KEY_LEFT, GRUB_TERM_KEY_DOWN,
/* 0x53 is NumLock. Handled by driver. */
/* 0x52 */ GRUB_TERM_KEY_UP, 0,
- /* 0x54 */ '/', '*',
+ /* 0x54 */ '/', '*',
/* 0x56 */ '-', '+',
- /* 0x58 */ '\n', GRUB_TERM_KEY_END,
+ /* 0x58 */ '\n', GRUB_TERM_KEY_END,
/* 0x5a */ GRUB_TERM_KEY_DOWN, GRUB_TERM_KEY_NPAGE,
/* 0x5c */ GRUB_TERM_KEY_LEFT, GRUB_TERM_KEY_CENTER,
/* 0x5e */ GRUB_TERM_KEY_RIGHT, GRUB_TERM_KEY_HOME,
/* Keyboard errors. Handled by driver. */
/* 0x00 */ 0, 0, 0, 0,
- /* 0x04 */ 'A', 'B', 'C', 'D',
+ /* 0x04 */ 'A', 'B', 'C', 'D',
/* 0x08 */ 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
/* 0x10 */ 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
/* 0x18 */ 'U', 'V', 'W', 'X', 'Y', 'Z', '!', '@',
/* 0x2c */ ' ' | GRUB_TERM_SHIFT, '_', '+', '{',
/* According to usage table 0x31 should be mapped to '/'
but testing with real keyboard shows that 0x32 is remapped to '/'.
- Map 0x31 to 0.
+ Map 0x31 to 0.
*/
/* 0x30 */ '}', 0, '|', ':', '"', '~', '<', '>',
/* 0x39 is CapsLock. Handled by driver. */
/* 0x38 */ '?', 0,
/* 0x3a */ GRUB_TERM_KEY_F1 | GRUB_TERM_SHIFT,
- /* 0x3b */ GRUB_TERM_KEY_F2 | GRUB_TERM_SHIFT,
- /* 0x3c */ GRUB_TERM_KEY_F3 | GRUB_TERM_SHIFT,
- /* 0x3d */ GRUB_TERM_KEY_F4 | GRUB_TERM_SHIFT,
- /* 0x3e */ GRUB_TERM_KEY_F5 | GRUB_TERM_SHIFT,
- /* 0x3f */ GRUB_TERM_KEY_F6 | GRUB_TERM_SHIFT,
- /* 0x40 */ GRUB_TERM_KEY_F7 | GRUB_TERM_SHIFT,
- /* 0x41 */ GRUB_TERM_KEY_F8 | GRUB_TERM_SHIFT,
- /* 0x42 */ GRUB_TERM_KEY_F9 | GRUB_TERM_SHIFT,
- /* 0x43 */ GRUB_TERM_KEY_F10 | GRUB_TERM_SHIFT,
- /* 0x44 */ GRUB_TERM_KEY_F11 | GRUB_TERM_SHIFT,
- /* 0x45 */ GRUB_TERM_KEY_F12 | GRUB_TERM_SHIFT,
+ /* 0x3b */ GRUB_TERM_KEY_F2 | GRUB_TERM_SHIFT,
+ /* 0x3c */ GRUB_TERM_KEY_F3 | GRUB_TERM_SHIFT,
+ /* 0x3d */ GRUB_TERM_KEY_F4 | GRUB_TERM_SHIFT,
+ /* 0x3e */ GRUB_TERM_KEY_F5 | GRUB_TERM_SHIFT,
+ /* 0x3f */ GRUB_TERM_KEY_F6 | GRUB_TERM_SHIFT,
+ /* 0x40 */ GRUB_TERM_KEY_F7 | GRUB_TERM_SHIFT,
+ /* 0x41 */ GRUB_TERM_KEY_F8 | GRUB_TERM_SHIFT,
+ /* 0x42 */ GRUB_TERM_KEY_F9 | GRUB_TERM_SHIFT,
+ /* 0x43 */ GRUB_TERM_KEY_F10 | GRUB_TERM_SHIFT,
+ /* 0x44 */ GRUB_TERM_KEY_F11 | GRUB_TERM_SHIFT,
+ /* 0x45 */ GRUB_TERM_KEY_F12 | GRUB_TERM_SHIFT,
/* PrtScr and ScrollLock. Not handled yet. */
/* 0x46 */ 0, 0,
/* 0x48 is Pause. Not handled yet. */
- /* 0x48 */ 0, GRUB_TERM_KEY_INSERT | GRUB_TERM_SHIFT,
+ /* 0x48 */ 0, GRUB_TERM_KEY_INSERT | GRUB_TERM_SHIFT,
/* 0x4a */ GRUB_TERM_KEY_HOME | GRUB_TERM_SHIFT,
/* 0x4b */ GRUB_TERM_KEY_PPAGE | GRUB_TERM_SHIFT,
/* 0x4c */ GRUB_TERM_KEY_DC | GRUB_TERM_SHIFT,
/* 0x51 */ GRUB_TERM_KEY_DOWN | GRUB_TERM_SHIFT,
/* 0x53 is NumLock. Handled by driver. */
/* 0x52 */ GRUB_TERM_KEY_UP | GRUB_TERM_SHIFT, 0,
- /* 0x54 */ '/', '*',
+ /* 0x54 */ '/', '*',
/* 0x56 */ '-', '+',
/* 0x58 */ '\n' | GRUB_TERM_SHIFT, '1', '2', '3', '4', '5','6', '7',
/* 0x60 */ '8', '9', '0', '.', '|'
else if (grub_current_layout->keyboard_map_l3[code])
{
*alt_gr_consumed = 1;
- return grub_current_layout->keyboard_map_l3[code];
+ return grub_current_layout->keyboard_map_l3[code];
}
}
if (status & (GRUB_TERM_STATUS_LSHIFT | GRUB_TERM_STATUS_RSHIFT))
}
key = map_key_core (code, status, &alt_gr_consumed);
-
+
if (key == 0 || key == GRUB_TERM_SHIFT) {
grub_printf ("Unknown key 0x%x detected\n", code);
return GRUB_TERM_NO_KEY;
}
-
+
if (status & GRUB_TERM_STATUS_CAPS)
{
if ((key >= 'a') && (key <= 'z'))
else if ((key >= 'A') && (key <= 'Z'))
key += 'a' - 'A';
}
-
- if ((status & GRUB_TERM_STATUS_LALT) ||
+
+ if ((status & GRUB_TERM_STATUS_LALT) ||
((status & GRUB_TERM_STATUS_RALT) && !alt_gr_consumed))
key |= GRUB_TERM_ALT;
if (status & (GRUB_TERM_STATUS_LCTRL | GRUB_TERM_STATUS_RCTRL))
{
const char *prefix = grub_env_get ("prefix");
if (!prefix)
- return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("variable `%s' isn't set"), "prefix");
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("variable `%s' isn't set"), "prefix");
filename = grub_xasprintf ("%s/layouts/%s.gkb", prefix, argv[0]);
if (!filename)
return grub_errno;
}
static enum
- {
- GUESS_IT, LINUX, MULTIBOOT, KFREEBSD, KNETBSD, KOPENBSD
+ {
+ GUESS_IT, LINUX, MULTIBOOT, KFREEBSD, KNETBSD, KOPENBSD
} kernel_type;
static grub_err_t
char **cutargs;
int cutargc;
grub_err_t err = GRUB_ERR_NONE;
-
+
for (i = 0; i < 2; i++)
{
/* FIXME: really support this. */
if (dev)
grub_device_close (dev);
}
-
+
/* k*BSD didn't really work well with grub-legacy. */
if (kernel_type == GUESS_IT || kernel_type == KFREEBSD)
{
digest = GRUB_MD_MD5->read (ctx);
GRUB_MD_MD5->final (ctx);
grub_memcpy (alt_result, digest, MD5_HASHLEN);
-
+
GRUB_MD_MD5->init (ctx);
GRUB_MD_MD5->write (ctx, entered, enteredlen);
GRUB_MD_MD5->write (ctx, pw->salt, pw->saltlen); /* include the $1$ header */
GRUB_MD_MD5->write (ctx, entered, enteredlen);
else
GRUB_MD_MD5->write (ctx, alt_result, 16);
-
+
if (i % 3 != 0)
GRUB_MD_MD5->write (ctx, pw->salt + 3, pw->saltlen - 3);
for (; *str && len; str++, len--)
grub_printf ("%c", *str);
for (len++; len; len--)
- grub_printf (" ");
+ grub_printf (" ");
}
#define print_field(x) print_strn(x, sizeof (x))
if (space == 0)
continue;
-
+
switch (space & GRUB_PCI_ADDR_SPACE_MASK)
{
case GRUB_PCI_ADDR_SPACE_IO:
(space & GRUB_PCI_ADDR_MEM_MASK),
space & GRUB_PCI_ADDR_MEM_PREFETCH
? "prefetchable" : "non-prefetchable");
-
+
}
else
grub_printf ("\t32-bit memory space %d at 0x%016llx [%s]\n",
(unsigned) ((reg - GRUB_PCI_REG_ADDRESSES)
/ sizeof (grub_uint32_t)) - 1,
- (unsigned long long)
+ (unsigned long long)
(space & GRUB_PCI_ADDR_MEM_MASK),
space & GRUB_PCI_ADDR_MEM_PREFETCH
? "prefetchable" : "non-prefetchable");
}
grub_printf_ (N_("CS5536 at %d:%d.%d\n"), grub_pci_get_bus (dev),
grub_pci_get_device (dev), grub_pci_get_function (dev));
-
+
err = grub_cs5536_init_smbus (dev, 0x7fff, &smbbase);
if (err)
return err;
GRUB_MOD_LICENSE ("GPLv3+");
-static const char *modnames_def[] = {
+static const char *modnames_def[] = {
/* FIXME: autogenerate this. */
#if defined (__i386__) || defined (__x86_64__) || defined (GRUB_MACHINE_MIPS_LOONGSON)
"pata", "ahci", "usbms", "ohci", "uhci", "ehci"
return grub_errno;
}
ptr = ptr2 + 1;
- ptr2 += grub_strlen (ptr2);
+ ptr2 += grub_strlen (ptr2);
while (ptr < ptr2)
{
int hex1, hex2;
if (type == 0)
{
*out_type = 0xfe;
- return 0;
+ return 0;
}
if (!(type & 0x80))
int (*pad) (gcry_mpi_t *hmpi, grub_uint8_t *hval,
const gcry_md_spec_t *hash, struct grub_public_subkey *sk);
const char *module;
-} pkalgos[] =
+} pkalgos[] =
{
[1] = { "rsa", 1, 2, &grub_crypto_pk_rsa, rsa_pad, "gcry_rsa" },
[3] = { "rsa", 1, 2, &grub_crypto_pk_rsa, rsa_pad, "gcry_rsa" },
grub_error (GRUB_ERR_BAD_SIGNATURE, N_("bad signature"));
break;
}
-
+
lb = (grub_be_to_cpu16 (l) + GRUB_CHAR_BIT - 1) / GRUB_CHAR_BIT;
if (lb > READBUF_SIZE - sizeof (grub_uint16_t))
{
grub_memcpy (buffer, &l, sizeof (l));
GRUB_MD_SHA1->write (fingerprint_context, buffer, lb + sizeof (grub_uint16_t));
-
+
if (gcry_mpi_scan (&sk->mpis[i], GCRYMPI_FMT_PGP,
buffer, lb + sizeof (grub_uint16_t), 0))
{
h = ctxt->v4.hash;
t = ctxt->v4.type;
pk = ctxt->v4.pkeyalgo;
-
+
if (t != 0)
return grub_error (GRUB_ERR_BAD_SIGNATURE, N_("bad signature"));
return grub_strdup (sec ? "enforce" : "no");
}
-static grub_ssize_t
+static grub_ssize_t
pseudo_read (struct grub_file *file, char *buf, grub_size_t len)
{
grub_memcpy (buf, (grub_uint8_t *) file->data + file->offset, len);
/* Filesystem descriptor. */
-struct grub_fs pseudo_fs =
+struct grub_fs pseudo_fs =
{
.name = "pseudo",
.fs_read = pseudo_read
if (!devname)
return 1;
ret = iterate_device (devname, ctx);
- grub_free (devname);
+ grub_free (devname);
return ret;
}
/* Helper for FUNC_NAME. */
static void
-try (struct search_ctx *ctx)
+try (struct search_ctx *ctx)
{
unsigned i;
struct cache_entry **prev;
}
if (state[SEARCH_LABEL].set)
- grub_search_label (id, var, state[SEARCH_NO_FLOPPY].set,
+ grub_search_label (id, var, state[SEARCH_NO_FLOPPY].set,
hints, nhints);
else if (state[SEARCH_FS_UUID].set)
grub_search_fs_uuid (id, var, state[SEARCH_NO_FLOPPY].set,
hints, nhints);
else if (state[SEARCH_FILE].set)
- grub_search_fs_file (id, var, state[SEARCH_NO_FLOPPY].set,
+ grub_search_fs_file (id, var, state[SEARCH_NO_FLOPPY].set,
hints, nhints);
else
grub_error (GRUB_ERR_INVALID_COMMAND, "unspecified search type");
grub_list_remove (GRUB_AS_LIST (term));
grub_list_push (GRUB_AS_LIST_P (enabled), GRUB_AS_LIST (term));
- }
+ }
}
-
+
{
struct abstract_terminal *next;
for (term = *enabled; term; term = next)
struct hook_ctx
{
- unsigned height, width, depth;
+ unsigned height, width, depth;
struct grub_video_mode_info *current_mode;
};
{
if (i == 0 || i == 1)
- {
+ {
color = grub_video_map_rgb (0, 0, 0);
grub_video_fill_rect (color, 0, 0, width, height);
ctx->found = 1;
return 1;
}
-
+
return 0;
}