merge trunk

This commit is contained in:
Colin Watson 2011-03-14 22:01:32 +00:00
commit 7bdeb3987a
83 changed files with 1453 additions and 383 deletions

View file

@ -26,7 +26,7 @@
#include <grub/msdos_partition.h>
#ifdef GRUB_UTIL
#include <grub/util/misc.h>
#include <grub/emu/misc.h>
#endif
static struct grub_partition_map grub_bsdlabel_partition_map;
@ -101,7 +101,8 @@ iterate_real (grub_disk_t disk, grub_disk_addr_t sector, int freebsd,
#ifdef GRUB_UTIL
char *partname;
/* disk->partition != NULL as 0 < delta */
partname = grub_partition_get_name (disk->partition);
partname = disk->partition ? grub_partition_get_name (disk->partition)
: "";
grub_util_warn ("Discarding improperly nested partition (%s,%s,%s%d)",
disk->name, partname, p.partmap->name, p.number + 1);
grub_free (partname);

View file

@ -271,14 +271,14 @@ pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
break;
}
if (end >= *nsectors + 1)
if (end >= *nsectors + 2)
{
int i, j;
unsigned i, j;
char *embed_signature_check;
unsigned int orig_nsectors;
orig_nsectors = *nsectors;
*nsectors = end - 1;
*nsectors = end - 2;
*sectors = grub_malloc (*nsectors * sizeof (**sectors));
if (!*sectors)
return grub_errno;