mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-14 16:59:28 +00:00
New Bazaar snapshot (mipsel build fix, LVM-on-RAID probing fix).
This commit is contained in:
commit
c54ea3a641
32
ChangeLog
32
ChangeLog
@ -1,3 +1,35 @@
|
||||
2010-11-26 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
Fix LVM-on-RAID probing.
|
||||
|
||||
* util/grub-probe.c (probe): Remember which disk was detected as
|
||||
RAID (perhaps an LVM physical volume). Use that disk's raidname
|
||||
rather than that of the top-level disk.
|
||||
|
||||
2010-11-25 BVK Chaitanya <bvk.groups@gmail.com>
|
||||
|
||||
Fix cmdline argument quotes for setparams command of menuentry
|
||||
definitions.
|
||||
|
||||
* grub-core/commands/menuentry.c (setparams_prefix): Use single
|
||||
quotes for arguments.
|
||||
* grub-core/lib/legacy_parse.c (grub_legacy_escape): Use
|
||||
grub_strchrsub function instead.
|
||||
|
||||
* include/grub/misc.h (grub_strchrsub): New function.
|
||||
|
||||
2010-11-24 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* util/deviceiter.c (grub_util_iterate_devices): Save a bit of
|
||||
effort by skipping "." and ".." entries up-front.
|
||||
Suggested by: Michael Lazarev.
|
||||
|
||||
2010-11-24 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* grub-core/Makefile.core.def (xz_decompress): Move -lgcc from
|
||||
ldflags to ldadd, to fix link line ordering.
|
||||
(none_decompress): Likewise.
|
||||
|
||||
2010-11-24 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* grub-core/Makefile.core.def (kernel): Add kern/emu/cache.S for emu
|
||||
|
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -1,5 +1,6 @@
|
||||
grub2 (1.99~20101124-2) UNRELEASED; urgency=low
|
||||
grub2 (1.99~20101126-1) UNRELEASED; urgency=low
|
||||
|
||||
* New Bazaar snapshot (mipsel build fix, LVM-on-RAID probing fix).
|
||||
* Fix comma-separation in handling of grub-pc/install_devices.
|
||||
|
||||
-- Colin Watson <cjwatson@debian.org> Fri, 26 Nov 2010 12:23:06 +0000
|
||||
|
@ -300,7 +300,8 @@ image = {
|
||||
mips_cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
|
||||
|
||||
objcopyflags = '-O binary';
|
||||
ldflags = '-lgcc -static-libgcc -Wl,-Ttext,0x80100000';
|
||||
ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
|
||||
ldadd = '-lgcc';
|
||||
cflags = '-static-libgcc';
|
||||
enable = mips;
|
||||
};
|
||||
@ -313,7 +314,8 @@ image = {
|
||||
mips_cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
|
||||
|
||||
objcopyflags = '-O binary';
|
||||
ldflags = '-lgcc -static-libgcc -Wl,-Ttext,0x80100000';
|
||||
ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
|
||||
ldadd = '-lgcc';
|
||||
cflags = '-static-libgcc';
|
||||
enable = mips;
|
||||
};
|
||||
|
@ -206,20 +206,6 @@ setparams_prefix (int argc, char **args)
|
||||
char *p;
|
||||
char *result;
|
||||
grub_size_t len = 10;
|
||||
static const char *escape_characters = "\"\\";
|
||||
|
||||
auto char *strescpy (char *, const char *, const char *);
|
||||
char * strescpy (char *d, const char *s, const char *escapes)
|
||||
{
|
||||
while (*s)
|
||||
{
|
||||
if (grub_strchr (escapes, *s))
|
||||
*d++ = '\\';
|
||||
*d++ = *s++;
|
||||
}
|
||||
*d = '\0';
|
||||
return d;
|
||||
}
|
||||
|
||||
/* Count resulting string length */
|
||||
for (i = 0; i < argc; i++)
|
||||
@ -227,7 +213,7 @@ setparams_prefix (int argc, char **args)
|
||||
len += 3; /* 3 = 1 space + 2 quotes */
|
||||
p = args[i];
|
||||
while (*p)
|
||||
len += grub_strchr (escape_characters, *p++) ? 2 : 1;
|
||||
len += (*p++ == '\'' ? 3 : 1);
|
||||
}
|
||||
|
||||
result = grub_malloc (len + 2);
|
||||
@ -235,17 +221,17 @@ setparams_prefix (int argc, char **args)
|
||||
return 0;
|
||||
|
||||
grub_strcpy (result, "setparams");
|
||||
i = 9;
|
||||
p = result + 9;
|
||||
|
||||
for (j = 0; j < argc; j++)
|
||||
{
|
||||
result[i++] = ' ';
|
||||
result[i++] = '"';
|
||||
i = strescpy (result + i, args[j], escape_characters) - result;
|
||||
result[i++] = '"';
|
||||
*p++ = ' ';
|
||||
*p++ = '\'';
|
||||
p = grub_strchrsub (p, args[j], '\'', "'\\''");
|
||||
*p++ = '\'';
|
||||
}
|
||||
result[i++] = '\n';
|
||||
result[i] = '\0';
|
||||
*p++ = '\n';
|
||||
*p = '\0';
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -322,30 +322,23 @@ struct legacy_command legacy_commands[] =
|
||||
char *
|
||||
grub_legacy_escape (const char *in, grub_size_t len)
|
||||
{
|
||||
const char *ptr;
|
||||
char *ret, *outptr;
|
||||
char *ptr;
|
||||
char *ret;
|
||||
char saved;
|
||||
int overhead = 0;
|
||||
for (ptr = in; ptr < in + len && *ptr; ptr++)
|
||||
|
||||
for (ptr = (char*)in; ptr < in + len && *ptr; ptr++)
|
||||
if (*ptr == '\'')
|
||||
overhead += 3;
|
||||
ret = grub_malloc (ptr - in + overhead + 1);
|
||||
if (!ret)
|
||||
return NULL;
|
||||
outptr = ret;
|
||||
for (ptr = in; ptr < in + len && *ptr; ptr++)
|
||||
{
|
||||
if (*ptr == '\'')
|
||||
{
|
||||
*outptr++ = '\'';
|
||||
*outptr++ = '\\';
|
||||
*outptr++ = '\'';
|
||||
*outptr++ = '\'';
|
||||
continue;
|
||||
}
|
||||
|
||||
*outptr++ = *ptr;
|
||||
}
|
||||
*outptr++ = 0;
|
||||
|
||||
ptr = (char*)in;
|
||||
saved = ptr[len];
|
||||
ptr[len] = '\0';
|
||||
grub_strchrsub (ret, ptr, '\'', "'\\''");
|
||||
ptr[len] = saved;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -193,6 +193,26 @@ grub_strncasecmp (const char *s1, const char *s2, grub_size_t n)
|
||||
return (int) grub_tolower (*s1) - (int) grub_tolower (*s2);
|
||||
}
|
||||
|
||||
/* Replace all `ch' characters of `input' with `with' and copy the
|
||||
result into `output'; return EOS address of `output'. */
|
||||
static inline char *
|
||||
grub_strchrsub (char *output, const char *input, char ch, const char *with)
|
||||
{
|
||||
grub_size_t grub_strlen (const char *s);
|
||||
while (*input)
|
||||
{
|
||||
if (*input == ch)
|
||||
{
|
||||
grub_strcpy (output, with);
|
||||
output += grub_strlen (with);
|
||||
input++;
|
||||
continue;
|
||||
}
|
||||
*output++ = *input++;
|
||||
}
|
||||
*output = '\0';
|
||||
return output;
|
||||
}
|
||||
|
||||
unsigned long EXPORT_FUNC(grub_strtoul) (const char *str, char **end, int base);
|
||||
unsigned long long EXPORT_FUNC(grub_strtoull) (const char *str, char **end, int base);
|
||||
|
@ -536,6 +536,10 @@ grub_util_iterate_devices (int NESTED_FUNC_ATTR (*hook) (const char *, int),
|
||||
necessary. */
|
||||
for (entry = readdir (dir); entry; entry = readdir (dir))
|
||||
{
|
||||
/* Skip current and parent directory entries. */
|
||||
if (strcmp (entry->d_name, ".") == 0 ||
|
||||
strcmp (entry->d_name, "..") == 0)
|
||||
continue;
|
||||
/* Skip partition entries. */
|
||||
if (strstr (entry->d_name, "-part"))
|
||||
continue;
|
||||
|
@ -142,6 +142,7 @@ probe (const char *path, char *device_name)
|
||||
int is_raid5 = 0;
|
||||
int is_raid6 = 0;
|
||||
int raid_level;
|
||||
grub_disk_t raid_disk;
|
||||
|
||||
raid_level = probe_raid_level (dev->disk);
|
||||
if (raid_level >= 0)
|
||||
@ -149,6 +150,7 @@ probe (const char *path, char *device_name)
|
||||
is_raid = 1;
|
||||
is_raid5 |= (raid_level == 5);
|
||||
is_raid6 |= (raid_level == 6);
|
||||
raid_disk = dev->disk;
|
||||
}
|
||||
|
||||
if ((is_lvm) && (dev->disk->dev->memberlist))
|
||||
@ -161,6 +163,7 @@ probe (const char *path, char *device_name)
|
||||
is_raid = 1;
|
||||
is_raid5 |= (raid_level == 5);
|
||||
is_raid6 |= (raid_level == 6);
|
||||
raid_disk = list->disk;
|
||||
}
|
||||
|
||||
tmp = list->next;
|
||||
@ -175,8 +178,8 @@ probe (const char *path, char *device_name)
|
||||
printf ("raid5rec ");
|
||||
if (is_raid6)
|
||||
printf ("raid6rec ");
|
||||
if (dev->disk->dev->raidname)
|
||||
printf ("%s ", dev->disk->dev->raidname (dev->disk));
|
||||
if (raid_disk->dev->raidname)
|
||||
printf ("%s ", raid_disk->dev->raidname (raid_disk));
|
||||
}
|
||||
|
||||
if (is_lvm)
|
||||
|
Loading…
Reference in New Issue
Block a user