for (curshort = arg + 1; *curshort; curshort++)
if (!find_short (cmd->options, *curshort))
break;
-
+
if (*curshort)
{
if (add_arg (&argl, &num, arg) != 0)
void __attribute__ ((noreturn))
_gcry_assert_failed (const char *expr, const char *file, int line,
const char *func)
-
+
{
grub_fatal ("assertion %s at %s:%d (%s) failed\n", expr, file, line, func);
}
}
}
-void
+void
grub_cipher_register (gcry_cipher_spec_t *cipher)
{
cipher->next = grub_ciphers;
}
}
-void
+void
grub_md_register (gcry_md_spec_t *digest)
{
digest->next = grub_digests;
grub_digests = digest;
}
-void
+void
grub_md_unregister (gcry_md_spec_t *cipher)
{
gcry_md_spec_t **ciph;
if (!ctx)
goto err;
- if ( keylen > md->blocksize )
+ if ( keylen > md->blocksize )
{
helpkey = grub_malloc (md->mdlen);
if (!helpkey)
grub_memcpy ( ipad, key, keylen );
grub_memcpy ( opad, key, keylen );
- for (i=0; i < md->blocksize; i++ )
+ for (i=0; i < md->blocksize; i++ )
{
ipad[i] ^= 0x36;
opad[i] ^= 0x5c;
while (1)
{
- key = grub_getkey ();
+ key = grub_getkey ();
if (key == '\n' || key == '\r')
break;
#define NEXT_MEMORY_DESCRIPTOR(desc, size) \
((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
-unsigned
+unsigned
grub_relocator_firmware_get_max_events (void)
{
grub_efi_uintn_t mmapsize = 0, descriptor_size = 0;
return 2 * (mmapsize / descriptor_size + 10);
}
-unsigned
+unsigned
grub_relocator_firmware_fill_events (struct grub_relocator_mmap_event *events)
{
grub_efi_uintn_t mmapsize = 0, desc_size = 0;
grub_uint64_t start = desc->physical_start;
grub_uint64_t end = desc->physical_start + (desc->num_pages << 12);
- /* post-4G addresses are never supported on 32-bit EFI.
+ /* post-4G addresses are never supported on 32-bit EFI.
Moreover it has been reported that some 64-bit EFI contrary to the
spec don't map post-4G pages. So if you enable post-4G allocations,
map pages manually or check that they are mapped.
counter++;
events[counter].type = REG_FIRMWARE_END;
events[counter].pos = end;
- counter++;
+ counter++;
}
return counter;
return -1;
return (int) ((grub_addr_t) token - (grub_addr_t) fdt
- grub_fdt_get_off_dt_struct (fdt));
-}
+}
int grub_fdt_first_node (const void *fdt, unsigned int parentoffset)
{
return -1;
return (int) ((grub_addr_t) token - (grub_addr_t) fdt
- grub_fdt_get_off_dt_struct (fdt));
-}
+}
/* Find a direct sub-node of a given parent node. */
int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset,
state.a20 = 0;
grub_stop_floppy ();
-
+
err = grub_relocator16_boot (relocator, state);
while (1);
if (err)
return err;
- grub_relocator16_cs = state.cs;
+ grub_relocator16_cs = state.cs;
grub_relocator16_ip = state.ip;
grub_relocator16_ds = state.ds;
#if GRUB_CPU_SIZEOF_VOID_P == 8
if (actual == 8)
{
- grub_cmos_port = (volatile grub_uint8_t *)
+ grub_cmos_port = (volatile grub_uint8_t *)
((((grub_addr_t) addr[0]) << 32) | addr[1]);
return 1;
}
grub_ieee1275_devices_iterate (grub_cmos_find_port_iter);
if (!grub_cmos_port)
return grub_error (GRUB_ERR_IO, "no cmos found");
-
+
return GRUB_ERR_NONE;
}
return 0;
}
-unsigned
+unsigned
grub_relocator_firmware_get_max_events (void)
{
int counter = 0;
return 0;
}
-unsigned
+unsigned
grub_relocator_firmware_fill_events (struct grub_relocator_mmap_event *events)
{
struct grub_relocator_firmware_fill_events_ctx ctx = {
2, {TYPE_FILE, TYPE_FILE}, FLAG_IGNORE_REST, "FILE1 FILE2",
"Compare the file FILE1 with the FILE2 and inform the different values"
" if any."},
- {"color", "set color_normal='%s'; set color_highlight='%s'\n", NULL, 0,
+ {"color", "set color_normal='%s'; set color_highlight='%s'\n", NULL, 0,
2, {TYPE_VERBATIM, TYPE_VERBATIM},
FLAG_IGNORE_REST | FLAG_FALLBACK_AVAILABLE, "NORMAL [HIGHLIGHT]",
"Change the menu colors. The color NORMAL is used for most"
0, {}, 0, 0, "Turn on/off the debug mode."},
{"default",
"set default='%s'; if [ x\"$default\" = xsaved ]; then load_env; "
- "set default=\"$saved_entry\"; fi\n", NULL, 0, 1, {TYPE_VERBATIM}, 0,
+ "set default=\"$saved_entry\"; fi\n", NULL, 0, 1, {TYPE_VERBATIM}, 0,
"[NUM | `saved']",
"Set the default entry to entry number NUM (if not specified, it is"
" 0, the first entry) or the entry number saved by savedefault."},
" tag."},
{"displayapm", "lsapm\n", NULL, 0, 0, {}, 0, 0,
"Display APM BIOS information."},
- {"displaymem", "lsmmap\n", NULL, 0, 0, {}, 0, 0,
+ {"displaymem", "lsmmap\n", NULL, 0, 0, {}, 0, 0,
"Display what GRUB thinks the system address space map of the"
" machine is, including all regions of physical RAM installed."},
/* FIXME: device and efimap unsupported. */
1, {TYPE_BOOL}, FLAG_FALLBACK_AVAILABLE, "[FLAG]",
"Toggle pager mode with no argument. If FLAG is given and its value"
" is `on', turn on the mode. If FLAG is `off', turn off the mode."},
- {"pager",
+ {"pager",
"if [ \"$pager\" = 1 ]; then pager=0; echo Internal pager is now off;"
"else pager=1; echo Internal pager is now on; fi\n", NULL, 0, 0, {},
FLAG_FALLBACK, NULL, NULL},
"Save the current entry as the default boot entry if no argument is"
" specified. If a number is specified, this number is saved. If"
" `fallback' is used, next fallback entry is saved."},
- {"serial", "serial %s\n", NULL, 0, 1, {TYPE_REST_VERBATIM}, 0,
+ {"serial", "serial %s\n", NULL, 0, 1, {TYPE_REST_VERBATIM}, 0,
"[--unit=UNIT] [--port=PORT] [--speed=SPEED] [--word=WORD] "
"[--parity=PARITY] [--stop=STOP] [--device=DEV]",
"Initialize a serial device. UNIT is a digit that specifies which serial"
{
if (*ptr == '\'' || *ptr == '\\')
*outptr++ = '\\';
-
+
*outptr++ = *ptr;
}
if (subpart != -1)
{
if (*ptr == '\'' || *ptr == '\\')
*outptr++ = '\\';
-
+
*outptr++ = *ptr;
}
*outptr = 0;
return (len >= 2 && curarg[0] == '-' && curarg[1] == '-');
default:
return 0;
- }
+ }
}
char *
{
int hold_arg = 0;
- const char *curarg = NULL;
+ const char *curarg = NULL;
for (i = 0; i < legacy_commands[cmdnum].argc; i++)
{
grub_size_t curarglen;
ptr++;
overhead += 3;
}
-
+
outptr0 = args[i] = grub_malloc (overhead + (ptr - curarg));
if (!outptr0)
return NULL;
case TYPE_FORCE_OPTION:
case TYPE_NOAPM_OPTION:
case TYPE_TYPE_OR_NOMEM_OPTION:
- case TYPE_OPTION:
+ case TYPE_OPTION:
args[i] = grub_strdup ("");
break;
case TYPE_BOOL:
case TYPE_INT:
args[i] = grub_strdup ("0");
break;
- case TYPE_VBE_MODE:
+ case TYPE_VBE_MODE:
args[i] = grub_strdup ("auto");
break;
}
if (!invert)
return NULL;
grub_memcpy (invert, slash + 1, len - (slash - corig) - 1);
- invert[len - (slash - args[0]) - 1] = '/';
+ invert[len - (slash - args[0]) - 1] = '/';
grub_memcpy (invert + len - (slash - corig), corig, slash - corig);
invert[len] = 0;
args[legacy_commands[cmdnum].argc] = invert;
}
printf ("ru_utime = %ld.%06ld\n",
- buf.ru_utime.tv_sec, buf.ru_utime.tv_usec);
+ buf.ru_utime.tv_sec, buf.ru_utime.tv_usec);
printf ("ru_stime = %ld.%06ld\n",
buf.ru_stime.tv_sec, buf.ru_stime.tv_usec);
printf ("ru_maxrss = %ld\n", buf.ru_maxrss );
{
static int idx;
static struct rusage buf[100];
-
+
if (!rb)
{
int i;
fprintf (stderr, "ru_utime ru_stime ru_minflt ru_nvcsw ru_nivcsw\n");
for (i=0; i < idx; i++)
fprintf (stderr, "%ld.%06ld %ld.%06ld %5ld %5ld %5ld\n",
- buf[i].ru_utime.tv_sec, buf[i].ru_utime.tv_usec,
- buf[i].ru_stime.tv_sec, buf[i].ru_stime.tv_usec,
- buf[i].ru_minflt,
+ buf[i].ru_utime.tv_sec, buf[i].ru_utime.tv_usec,
+ buf[i].ru_stime.tv_sec, buf[i].ru_stime.tv_usec,
+ buf[i].ru_minflt,
buf[i].ru_nvcsw,
buf[i].ru_nivcsw);
- }
+ }
else if (idx < DIM(buf))
{
buf[idx++] = *rb;
add_randomness( &buf, sizeof buf, 1 );
memset( &buf, 0, sizeof buf );
}
-
+
*/
/* mpihelp-add_1.c - MPI helper functions
- * Copyright (C) 1994, 1996, 1997, 1998,
+ * Copyright (C) 1994, 1996, 1997, 1998,
* 2000, 2002 Free Software Foundation, Inc.
*
* This file is part of Libgcrypt.
res_ptr -= j;
cy = 0;
- do
+ do
{
y = s2_ptr[j];
x = s1_ptr[j];
y += x; /* add other addend */
cy += y < x; /* get out carry from that add, combine */
res_ptr[j] = y;
- }
+ }
while ( ++j );
return cy;
low_limb = up[i];
retval = low_limb >> sh_2;
high_limb = low_limb;
- while ( --i >= 0 )
+ while ( --i >= 0 )
{
low_limb = up[i];
wp[i] = (high_limb << sh_1) | (low_limb >> sh_2);
res_ptr -= j;
cy_limb = 0;
- do
+ do
{
umul_ppmm( prod_high, prod_low, s1_ptr[j], s2_limb );
prod_low += cy_limb;
cy_limb = (prod_low < cy_limb?1:0) + prod_high;
res_ptr[j] = prod_low;
- }
+ }
while( ++j );
return cy_limb;
s1_ptr -= j;
cy_limb = 0;
- do
+ do
{
umul_ppmm( prod_high, prod_low, s1_ptr[j], s2_limb );
prod_low = x + prod_low;
cy_limb += prod_low < x?1:0;
res_ptr[j] = prod_low;
- }
+ }
while ( ++j );
-
+
return cy_limb;
}
s1_ptr -= j;
cy_limb = 0;
- do
+ do
{
umul_ppmm( prod_high, prod_low, s1_ptr[j], s2_limb);
prod_low = x - prod_low;
cy_limb += prod_low > x?1:0;
res_ptr[j] = prod_low;
- }
+ }
while( ++j );
return cy_limb;
res_ptr -= j;
cy = 0;
- do
+ do
{
y = s2_ptr[j];
x = s1_ptr[j];
y = x - y; /* main subtract */
cy += y > x; /* get out carry from the subtract, combine */
res_ptr[j] = y;
- }
+ }
while( ++j );
return cy;
/* syntax.h -- Definitions for x86 syntax variations.
*
- * Copyright (C) 1992, 1994, 1995, 1998,
+ * Copyright (C) 1992, 1994, 1995, 1998,
* 2001, 2002 Free Software Foundation, Inc.
*
* This file is part of Libgcrypt.
*
* Copyright (C) 1992, 1994, 1996, 1998,
* 2001, 2002 Free Software Foundation, Inc.
- *
+ *
* This file is part of Libgcrypt.
*
* Libgcrypt is free software; you can redistribute it and/or modify
break;
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_RESET,
grub_cs5536_read_msr (dev,
- GRUB_CS5536_MSR_DIVIL_RESET)
+ GRUB_CS5536_MSR_DIVIL_RESET)
| 1);
break;
}
write_reg (8, (grub_uint32_t) src, &ptr);
write_reg (9, (grub_uint32_t) dest, &ptr);
write_reg (10, (grub_uint32_t) size, &ptr);
- grub_memcpy (ptr, &grub_relocator_forward_start,
+ grub_memcpy (ptr, &grub_relocator_forward_start,
RELOCATOR_SRC_SIZEOF (forward));
}
return grub_toupper (c);
}
-static inline int
+static inline int
isspace (int c)
{
return grub_isspace (c);
}
-static inline int
+static inline int
isdigit (int c)
{
return grub_isdigit (c);
return grub_isxdigit (c);
}
-static inline int
+static inline int
isprint (int c)
{
return grub_isprint (c);
}
-static inline int
+static inline int
iscntrl (int c)
{
return !grub_isprint (c);
}
-static inline int
+static inline int
isgraph (int c)
{
return grub_isprint (c) && !grub_isspace (c);
return grub_isalpha (c) || grub_isdigit (c);
}
-static inline int
+static inline int
ispunct (int c)
{
return grub_isprint (c) && !grub_isspace (c) && !isalnum (c);
}
-static inline int
+static inline int
isalpha (int c)
{
return grub_isalpha (c);
#include <grub/misc.h>
#include <grub/safemath.h>
-static inline void
+static inline void
free (void *ptr)
{
grub_free (ptr);
return grub_strlen (s);
}
-static inline int
+static inline int
strcmp (const char *s1, const char *s2)
{
return grub_strcmp (s1, s2);
}
-static inline int
+static inline int
strcasecmp (const char *s1, const char *s2)
{
return grub_strcasecmp (s1, s2);
wctype (const char *name)
{
wctype_t i;
- static const char names[][10] = { "",
+ static const char names[][10] = { "",
"alnum", "cntrl", "lower",
"space", "alpha", "digit",
"print", "upper", "blank",
write_reg (int regn, grub_uint32_t val, void **target)
{
/* lis r, val >> 16 */
- *(grub_uint32_t *) *target =
+ *(grub_uint32_t *) *target =
((0x3c00 | (regn << 5)) << 16) | (val >> 16);
*target = ((grub_uint32_t *) *target) + 1;
/* ori r, r, val & 0xffff. */
write_reg (8, (grub_uint32_t) src, &ptr);
write_reg (9, (grub_uint32_t) dest, &ptr);
write_reg (10, (grub_uint32_t) size, &ptr);
- grub_memcpy (ptr, &grub_relocator_forward_start,
+ grub_memcpy (ptr, &grub_relocator_forward_start,
RELOCATOR_SRC_SIZEOF (forward));
}
grub_priority_queue_pop (grub_priority_queue_t pq)
{
grub_size_t p;
-
+
swap (pq, 0, pq->used - 1);
pq->used--;
for (p = 0; left_child (p) < pq->used; )
sigma[i] = 0;
gauss_solve (eqstat, rs2, rs2, sigma);
- }
+ }
for (i = 0; i < (int) (rs + s); i++)
if (pol_evaluate (sigma, rs2 - 1, 255 - i) == gf_powx[i])
for (j = 0; j < ds; j++)
m[j] = ptr[SECTOR_SIZE * j + i];
rs_encode (m, ds, rr);
- for (j = 0; j < rr; j++)
+ for (j = 0; j < rr; j++)
rptr[SECTOR_SIZE * j + i] = m[j + ds];
free (m);
}
buf = xmalloc (s + rs + SECTOR_SIZE);
fread (buf, 1, s + rs, out);
- fclose (out);
+ fclose (out);
#endif
#if 1
grub_memset (buf + 512 * 15, 0, 512);
ret = grub_zalloc (sizeof (struct grub_relocator));
if (!ret)
return NULL;
-
+
ret->postchunks = ~(grub_phys_addr_t) 0;
ret->relocators_size = grub_relocator_jumper_size;
grub_dprintf ("relocator", "relocators_size=%lu\n",
grub_mm_header_t new_header;
grub_mm_header_t hb = (grub_mm_header_t) (rb + 1);
-#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
+#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
grub_dprintf ("relocator", "ra = %p, rb = %p\n", regancestor, rb);
#endif
newreg_start = ALIGN_UP (newreg_raw_start, GRUB_MM_ALIGN);
{
new_header = hb->next;
if (new_header == hb)
- new_header = (void *) (newreg_start + sizeof (*rb));
+ new_header = (void *) (newreg_start + sizeof (*rb));
}
{
struct grub_mm_header *newregfirst = rb->first;
(unsigned long) paddr, (unsigned long) size, hb, hbp,
rb, (unsigned long) vaddr);
#endif
-
+
if (ALIGN_UP (vaddr + size, GRUB_MM_ALIGN) + GRUB_MM_ALIGN
<= (grub_addr_t) (hb + hb->size))
{
}
else
foll = hb->next;
-
+
hbp->next = foll;
if (rb->first == hb)
{
}
break;
#endif
- }
+ }
}
static int
if (end < start + size)
return 0;
- /* We have to avoid any allocations when filling scanline events.
+ /* We have to avoid any allocations when filling scanline events.
Hence 2-stages.
*/
for (r = grub_mm_base; r; r = r->next)
{
#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
grub_dprintf ("relocator", "Blocking at 0x%lx-0x%lx\n",
- (unsigned long) r - r->pre_size,
+ (unsigned long) r - r->pre_size,
(unsigned long) (r + 1) + r->size);
#endif
events[N].type = FIRMWARE_BLOCK_START;
p = pa->next;
if (p->magic == GRUB_MM_ALLOC_MAGIC)
continue;
- do
+ do
{
if (p->magic != GRUB_MM_FREE_MAGIC)
grub_fatal ("%s:%d free magic broken at %p (0x%x)\n",
{
grub_memset (counter, 0, (1 + (1 << DIGITSORT_BITS)) * sizeof (counter[0]));
for (j = 0; j < N; j++)
- counter[((events[j].pos >> (DIGITSORT_BITS * i))
+ counter[((events[j].pos >> (DIGITSORT_BITS * i))
& DIGITSORT_MASK) + 1]++;
for (j = 0; j <= DIGITSORT_MASK; j++)
counter[j+1] += counter[j];
for (j = 0; j < N; j++)
- eventt[counter[((events[j].pos >> (DIGITSORT_BITS * i))
+ eventt[counter[((events[j].pos >> (DIGITSORT_BITS * i))
& DIGITSORT_MASK)]++] = events[j];
t = eventt;
eventt = events;
const int nlefto = 0;
#endif
grub_addr_t starta = 0;
- for (j = from_low_priv ? 0 : N - 1; from_low_priv ? j < N : (j + 1);
+ for (j = from_low_priv ? 0 : N - 1; from_low_priv ? j < N : (j + 1);
from_low_priv ? j++ : j--)
{
int isinsidebefore, isinsideafter;
nstarted--;
break;
}
- isinsideafter = (!ncollisions && (nstarted || ((nlefto || nstartedfw)
+ isinsideafter = (!ncollisions && (nstarted || ((nlefto || nstartedfw)
&& !nblockfw)));
if (from_low_priv) {
if (!isinsidebefore && isinsideafter)
fend
= ALIGN_UP (alloc_end,
GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT);
-#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
+#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
grub_dprintf ("relocator", "requesting %lx-%lx\n",
(unsigned long) fstart,
(unsigned long) fend);
#endif
/* The failure here can be very expensive. */
- if (!grub_relocator_firmware_alloc_region (fstart,
+ if (!grub_relocator_firmware_alloc_region (fstart,
fend - fstart))
{
if (from_low_priv)
nallocs++;
}
}
-
+
switch (events[j].type)
{
case REG_BEG_START:
}
static void
-adjust_limits (struct grub_relocator *rel,
+adjust_limits (struct grub_relocator *rel,
grub_phys_addr_t *min_addr, grub_phys_addr_t *max_addr,
grub_phys_addr_t in_min, grub_phys_addr_t in_max)
{
{
if (rel->highestnonpostaddr < target + size)
rel->highestnonpostaddr = target + size;
-
+
if (rel->highestnonpostaddr < chunk->src + size)
- rel->highestnonpostaddr = chunk->src + size;
+ rel->highestnonpostaddr = chunk->src + size;
}
grub_dprintf ("relocator", "relocators_size=%ld\n",
for (chunk = rel->chunks; chunk; chunk = next)
{
unsigned i;
- for (i = 0; i < chunk->nsubchunks; i++)
+ for (i = 0; i < chunk->nsubchunks; i++)
free_subchunk (&chunk->subchunks[i]);
grub_unmap_memory (chunk->srcv, chunk->size);
next = chunk->next;
*relsize = rel->relocators_size;
grub_dprintf ("relocator", "Relocs allocated at %p\n", movers_chunk.srcv);
-
+
{
unsigned i;
grub_size_t count[257];
struct grub_relocator_chunk *chunk;
for (chunk = rel->chunks; chunk; chunk = chunk->next)
{
- grub_dprintf ("relocator", "chunk %p->%p, 0x%lx\n",
+ grub_dprintf ("relocator", "chunk %p->%p, 0x%lx\n",
(void *) chunk->src, (void *) chunk->target,
(unsigned long) chunk->size);
nchunks++;
for (j = 0; j < nchunks; j++)
{
- grub_dprintf ("relocator", "sorted chunk %p->%p, 0x%lx\n",
+ grub_dprintf ("relocator", "sorted chunk %p->%p, 0x%lx\n",
(void *) sorted[j].src, (void *) sorted[j].target,
(unsigned long) sorted[j].size);
if (sorted[j].src < sorted[j].target)
p = pa->next;
if (p->magic == GRUB_MM_ALLOC_MAGIC)
continue;
- do
+ do
{
if ((grub_addr_t) p < (grub_addr_t) (r + 1)
|| (grub_addr_t) p >= (grub_addr_t) (r + 1) + r->size)
char hotkey;
int make_default;
struct syslinux_say *say;
-
- enum { KERNEL_NO_KERNEL, KERNEL_LINUX, KERNEL_CHAINLOADER,
+
+ enum { KERNEL_NO_KERNEL, KERNEL_LINUX, KERNEL_CHAINLOADER,
KERNEL_BIN, KERNEL_PXE, KERNEL_CHAINLOADER_BPB,
KERNEL_COM32, KERNEL_COM, KERNEL_IMG, KERNEL_CONFIG, LOCALBOOT }
entry_type;
{
char buf[20];
grub_snprintf (buf, sizeof (buf), "%d", n);
- return print (outbuf, buf, grub_strlen (buf));
+ return print (outbuf, buf, grub_strlen (buf));
}
static grub_err_t
if (end - line >= 4 && grub_strcasecmp (end - 4, ".img") == 0)
menu->entries->entry_type = KERNEL_IMG;
-
+
return GRUB_ERR_NONE;
}
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_LINUX;
-
+
return GRUB_ERR_NONE;
}
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_CHAINLOADER;
-
+
return GRUB_ERR_NONE;
}
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_CHAINLOADER_BPB;
-
+
return GRUB_ERR_NONE;
}
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_PXE;
-
+
return GRUB_ERR_NONE;
}
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_IMG;
-
+
return GRUB_ERR_NONE;
}
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_COM;
-
+
return GRUB_ERR_NONE;
}
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_COM32;
-
+
return GRUB_ERR_NONE;
}
return grub_errno;
}
menu->entries->entry_type = KERNEL_CONFIG;
-
+
return GRUB_ERR_NONE;
}
menu->entries->append = grub_strdup (line);
if (!menu->entries->append)
return grub_errno;
-
+
return GRUB_ERR_NONE;
}
while (*line == ',')
line++;
}
-
+
return GRUB_ERR_NONE;
}
menu->def = grub_strdup (line);
if (!menu->def)
return grub_errno;
-
+
return GRUB_ERR_NONE;
}
cmd_timeout (const char *line, struct syslinux_menu *menu)
{
menu->timeout = grub_strtoul (line, NULL, 0);
-
+
return GRUB_ERR_NONE;
}
if (!menu->entries)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label");
- menu->entries->make_default = 1;
+ menu->entries->make_default = 1;
return GRUB_ERR_NONE;
}
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = LOCALBOOT;
-
+
return GRUB_ERR_NONE;
}
*out++ = *in++;
}
*out = 0;
-
+
return GRUB_ERR_NONE;
}
ret = syslinux_parse_real (menu);
if (ret == GRUB_ERR_FILE_NOT_FOUND
|| ret == GRUB_ERR_BAD_FILENAME)
- {
+ {
grub_errno = ret = GRUB_ERR_NONE;
add_comment (menu, "# File ", 0);
add_comment (menu, nf, 0);
}
static grub_err_t
-print_escaped (struct output_buffer *outbuf,
+print_escaped (struct output_buffer *outbuf,
const char *from, const char *to)
{
const char *ptr;
case KERNEL_COM:
{
char *basename = NULL;
-
+
{
char *ptr;
for (ptr = curentry->kernel_file; *ptr; ptr++)
if (grub_strcasecmp (basename, "whichsys.c32") == 0)
{
grub_syslinux_flavour_t flavour = GRUB_SYSLINUX_ISOLINUX;
- const char *flav[] =
- {
+ const char *flav[] =
+ {
[GRUB_SYSLINUX_ISOLINUX] = "iso",
[GRUB_SYSLINUX_PXELINUX] = "pxe",
[GRUB_SYSLINUX_SYSLINUX] = "sys"
grub_free (initrd->file);
grub_free (initrd);
}
-
+
grub_free (entry->comments);
grub_free (entry->kernel_file);
grub_free (entry->label);
print_string ("\n");
}
for (curentry = lentry; curentry; curentry = curentry->prev)
- {
+ {
print_string ("menuentry ");
err = print_escaped (outbuf,
curentry->extlabel ? : curentry->label, NULL);
{
#ifndef GRUB_EMBED_DECOMPRESSOR
const gcry_md_spec_t *hash = crc32 ? s->crc32 : s->hash;
- void *hash_context = crc32 ? s->crc32_context
+ void *hash_context = crc32 ? s->crc32_context
: s->hash_context;
if(!s->have_hash_value && hash
&& sizeof (s->hash_value) >= hash->mdlen)
kfree(s->crc32_context);
return XZ_MEMLIMIT_ERROR;
}
-
+
s->index.hash.hash_context = kmalloc(s->hash->contextsize,
GFP_KERNEL);
if (s->index.hash.hash_context == NULL)
kfree(s->crc32_context);
return XZ_MEMLIMIT_ERROR;
}
-
+
s->block.hash.hash_context = kmalloc(s->hash->contextsize, GFP_KERNEL);
if (s->block.hash.hash_context == NULL)
{