diff options
| author | Toomas Soome <tsoome@me.com> | 2019-11-18 14:25:51 +0200 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2019-11-26 17:06:58 +0200 |
| commit | d30992fa3989ef47543839be59b8c86165285ec4 (patch) | |
| tree | d5ad216118a622ba59b30d8432fc112936154c20 | |
| parent | a629ded1d7b2e67c2028ccbc5ba9099328cc4e1b (diff) | |
| download | illumos-joyent-d30992fa3989ef47543839be59b8c86165285ec4.tar.gz | |
11995 format: efi usable size is missing 1 sector
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Approved by: Dan McDonald <danmcd@joyent.com>
| -rw-r--r-- | usr/src/cmd/format/io.c | 2 | ||||
| -rw-r--r-- | usr/src/cmd/format/modify_partition.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/cmd/format/io.c b/usr/src/cmd/format/io.c index d0953a59d6..dd0cbc2397 100644 --- a/usr/src/cmd/format/io.c +++ b/usr/src/cmd/format/io.c @@ -1561,7 +1561,7 @@ or g(gigabytes)\n"); reserved = efi_reserved_sectors(cur_parts->etoc); return (bounds->upper - reserved - - efi_deflt->start_sector); + efi_deflt->start_sector + 1); } /* diff --git a/usr/src/cmd/format/modify_partition.c b/usr/src/cmd/format/modify_partition.c index d01463e757..365dc9462f 100644 --- a/usr/src/cmd/format/modify_partition.c +++ b/usr/src/cmd/format/modify_partition.c @@ -589,10 +589,10 @@ get_user_map_efi(map, float_part) start_lba += i64; } map->efi_parts[float_part].p_start = start_lba; - map->efi_parts[float_part].p_size = map->efi_last_u_lba - + map->efi_parts[float_part].p_size = map->efi_last_u_lba + 1 - start_lba - reserved; map->efi_parts[float_part].p_tag = V_USR; - if (map->efi_parts[float_part].p_size == UINT_MAX64) { + if (map->efi_parts[float_part].p_size == 0) { map->efi_parts[float_part].p_size = 0; map->efi_parts[float_part].p_start = 0; map->efi_parts[float_part].p_tag = V_UNASSIGNED; @@ -602,7 +602,7 @@ get_user_map_efi(map, float_part) for (i = 0; i < map->efi_nparts; i++) { if (map->efi_parts[i].p_tag == V_RESERVED) { map->efi_parts[i].p_start = map->efi_last_u_lba - - reserved; + reserved + 1; map->efi_parts[i].p_size = reserved; break; } |
