2007-07-22 Robert Millan <rmh@aybabtu.com>

* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
	GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
	flag when running on SmartFirmware.
	* term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
	"output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
	was set.

	* kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
	Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
	rather than decreasing it.

	* util/i386/pc/grub-setup.c (setup): When embedding is required, but
	there's not enough space to do it, fail in the same way as when it
	can't be done because there are no partitions.

	* util/powerpc/ieee1275/grub-install.in: Improve error message shown
	when nvsetenv failed.
This commit is contained in:
robertmh 2007-07-22 09:05:11 +00:00
parent 969c02ec31
commit ad0686cc6d
7 changed files with 44 additions and 7 deletions

View file

@ -62,7 +62,10 @@ grub_ieee1275_find_options (void)
grub_ieee1275_finddevice ("/openprom", &openprom);
rc = grub_ieee1275_get_property (openprom, "SmartFirmware-version", 0, 0, 0);
if (rc >= 0)
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS);
{
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS);
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_OUTPUT);
}
}
void cmain (uint32_t r3, uint32_t r4, uint32_t r5);

View file

@ -372,7 +372,7 @@ grub_ieee1275_encode_devname (const char *path)
if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS))
/* GRUB partition 1 is OF partition 0. */
partno--;
partno++;
/* Assume partno will require less than five bytes to encode. */
encoding = grub_malloc (grub_strlen (device) + 3 + 5);