summaryrefslogtreecommitdiff
path: root/usr/src/cmd/format/io.c
diff options
context:
space:
mode:
authoryu, larry liu - Sun Microsystems - Beijing China <Larry.Liu@Sun.COM>2009-06-17 19:20:05 +0800
committeryu, larry liu - Sun Microsystems - Beijing China <Larry.Liu@Sun.COM>2009-06-17 19:20:05 +0800
commit65908c77dfc02644236ba18bffe67b5ed6f23135 (patch)
tree90d89cc047a404c32e2537573bee1d8566a562e3 /usr/src/cmd/format/io.c
parent6ccacea7930c58faadb6224d30e24c5658b67c81 (diff)
downloadillumos-gate-65908c77dfc02644236ba18bffe67b5ed6f23135.tar.gz
PSARC 2008/769 Multiple disk sector size support.
6710930 Solaris needs to support large sector size hard drive disk
Diffstat (limited to 'usr/src/cmd/format/io.c')
-rw-r--r--usr/src/cmd/format/io.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr/src/cmd/format/io.c b/usr/src/cmd/format/io.c
index 1aa2413c65..6e9e4064a9 100644
--- a/usr/src/cmd/format/io.c
+++ b/usr/src/cmd/format/io.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -606,11 +606,11 @@ reprompt:
fmt_print("[%llub, %llue, %llumb, %llugb, %llutb]",
efi_deflt->end_sector,
efi_deflt->start_sector + efi_deflt->end_sector - 1,
- (efi_deflt->end_sector * DEV_BSIZE) /
+ (efi_deflt->end_sector * cur_blksz) /
(1024 * 1024),
- (efi_deflt->end_sector * DEV_BSIZE) /
+ (efi_deflt->end_sector * cur_blksz) /
(1024 * 1024 * 1024),
- (efi_deflt->end_sector * DEV_BSIZE) /
+ (efi_deflt->end_sector * cur_blksz) /
((uint64_t)1024 * 1024 * 1024 * 1024));
break;
case FIO_OPINT:
@@ -1518,13 +1518,13 @@ or g(gigabytes)\n");
fmt_print("Expecting up to %llu sectors,",
cur_parts->etoc->efi_last_u_lba);
fmt_print("or %llu megabytes,",
- (cur_parts->etoc->efi_last_u_lba * DEV_BSIZE)/
+ (cur_parts->etoc->efi_last_u_lba * cur_blksz)/
(1024 * 1024));
fmt_print("or %llu gigabytes\n",
- (cur_parts->etoc->efi_last_u_lba * DEV_BSIZE)/
+ (cur_parts->etoc->efi_last_u_lba * cur_blksz)/
(1024 * 1024 * 1024));
fmt_print("or %llu terabytes\n",
- (cur_parts->etoc->efi_last_u_lba * DEV_BSIZE)/
+ (cur_parts->etoc->efi_last_u_lba * cur_blksz)/
((uint64_t)1024 * 1024 * 1024 * 1024));
break;
}
@@ -1676,7 +1676,7 @@ or g(gigabytes)\n");
break;
}
return (uint64_t)((float)nmegs * 1024.0 *
- 1024.0 * 1024.0 * 1024.0 / DEV_BSIZE);
+ 1024.0 * 1024.0 * 1024.0 / cur_blksz);
default:
err_print(
@@ -2102,6 +2102,7 @@ pr_diskline(disk, num)
type->dtype_acyl, type->dtype_nhead,
type->dtype_nsect);
} else if ((type != NULL) && (disk->label_type == L_TYPE_EFI)) {
+ cur_blksz = disk->disk_lbasize;
print_efi_string(type->vendor, type->product,
type->revision, type->capacity);
} else if (disk->disk_flags & DSK_RESERVED) {