diff options
author | Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> | 2016-01-31 15:39:20 +0100 |
---|---|---|
committer | Hans Rosenfeld <hans.rosenfeld@nexenta.com> | 2016-03-16 17:57:15 +0100 |
commit | 9890706ed36aa6bfca8ad283fbe4dac12ecd692b (patch) | |
tree | 048351ded0c77af8d77d1fca216a020f4aa415e7 /usr/src/cmd/boot/installgrub/installgrub.c | |
parent | 621be8d08fd45483b5ca1cb8e2e88239f1502b4d (diff) | |
download | illumos-joyent-9890706ed36aa6bfca8ad283fbe4dac12ecd692b.tar.gz |
6593 want LBA48 support in grub
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/cmd/boot/installgrub/installgrub.c')
-rw-r--r-- | usr/src/cmd/boot/installgrub/installgrub.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr/src/cmd/boot/installgrub/installgrub.c b/usr/src/cmd/boot/installgrub/installgrub.c index b01bcbd922..9611bc8a62 100644 --- a/usr/src/cmd/boot/installgrub/installgrub.c +++ b/usr/src/cmd/boot/installgrub/installgrub.c @@ -21,8 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. - * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright 2016 Toomas Soome <tsoome@me.com> + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #include <stdio.h> @@ -1426,7 +1426,14 @@ prepare_stage2(ig_data_t *install, char *updt_str) i += 2; } } else { - /* Solaris VTOC */ + /* Solaris VTOC & EFI */ + if (device->start_sector > + UINT32_MAX - STAGE2_BLKOFF(device->type)) { + fprintf(stderr, gettext("Error: partition start sector " + "must be less than %lld\n"), + (uint64_t)UINT32_MAX - STAGE2_BLKOFF(device->type)); + return (BC_ERROR); + } stage2->first_sector = device->start_sector + STAGE2_BLKOFF(device->type); BOOT_DEBUG("stage2 first sector: %d\n", stage2->first_sector); |