summaryrefslogtreecommitdiff
path: root/usr/src/cmd/format/label.c
diff options
context:
space:
mode:
authoryl194034 <none@none>2007-05-23 22:18:37 -0700
committeryl194034 <none@none>2007-05-23 22:18:37 -0700
commit1cce8a3fd4de339002c756b920bbddde497b9f78 (patch)
tree145628cf195ea199742d95f5b35def555dc91588 /usr/src/cmd/format/label.c
parent5dbcb2a2ded752a6731e3db12a239d1380080da3 (diff)
downloadillumos-joyent-1cce8a3fd4de339002c756b920bbddde497b9f78.tar.gz
6466433 Default EFI slice table leaves one sector unused.
6474622 auto configure to a EFI labeled lun should generate a whole hog partition table 6537609 validate64 function reads past the end of efi->parts
Diffstat (limited to 'usr/src/cmd/format/label.c')
-rw-r--r--usr/src/cmd/format/label.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/cmd/format/label.c b/usr/src/cmd/format/label.c
index 6f7e887f39..56c4aa1ce4 100644
--- a/usr/src/cmd/format/label.c
+++ b/usr/src/cmd/format/label.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -234,7 +234,7 @@ SMI_vtoc_to_EFI(int fd, struct dk_gpt **new_vtoc)
efi->efi_parts[0].p_tag = V_USR;
efi->efi_parts[0].p_start = efi->efi_first_u_lba;
efi->efi_parts[0].p_size = efi->efi_last_u_lba - efi->efi_first_u_lba
- - EFI_MIN_RESV_SIZE;
+ - EFI_MIN_RESV_SIZE + 1;
/*
* s1-s6 are unassigned slices
@@ -250,7 +250,7 @@ SMI_vtoc_to_EFI(int fd, struct dk_gpt **new_vtoc)
*/
efi->efi_parts[efi->efi_nparts - 1].p_tag = V_RESERVED;
efi->efi_parts[efi->efi_nparts - 1].p_start =
- efi->efi_last_u_lba - EFI_MIN_RESV_SIZE;
+ efi->efi_last_u_lba - EFI_MIN_RESV_SIZE + 1;
efi->efi_parts[efi->efi_nparts - 1].p_size = EFI_MIN_RESV_SIZE;
return (0);