summaryrefslogtreecommitdiff
path: root/usr/src/cmd/format
diff options
context:
space:
mode:
authorbo zhou - Sun Microsystems - Beijing China <Bo.Zhou@Sun.COM>2008-09-16 13:11:07 +0800
committerbo zhou - Sun Microsystems - Beijing China <Bo.Zhou@Sun.COM>2008-09-16 13:11:07 +0800
commit60b0c6ebd6a22a96958386b066f00df6196f78ed (patch)
tree59d94ca1b95d7d0d4f793f03ce12299346cd10f8 /usr/src/cmd/format
parent75fe78a8af9f325c366ddcde31a6ae1077f2a9eb (diff)
downloadillumos-joyent-60b0c6ebd6a22a96958386b066f00df6196f78ed.tar.gz
6555612 format should not ask about "Label it now" when selecting a disk with MBR but no fdisk partitions
Diffstat (limited to 'usr/src/cmd/format')
-rw-r--r--usr/src/cmd/format/menu_command.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/src/cmd/format/menu_command.c b/usr/src/cmd/format/menu_command.c
index 1eedba1c85..da496e3448 100644
--- a/usr/src/cmd/format/menu_command.c
+++ b/usr/src/cmd/format/menu_command.c
@@ -303,6 +303,11 @@ found:
if (nhead != 0 && nsect != 0)
(void) copy_solaris_part(&cur_disk->fdisk_part);
+ if (cur_disk->fdisk_part.numsect == 0) {
+ err_print("\nNo fdisk solaris partition found.\n");
+ goto exit;
+ }
+
if ((cur_disk->label_type == L_TYPE_EFI) &&
(cur_disk->disk_parts->etoc->efi_flags &
EFI_GPT_PRIMARY_CORRUPT)) {
@@ -324,6 +329,7 @@ found:
}
}
}
+exit:
return (0);
}