apps/DriveSetup Warn before formatting Intel extended Partition
* Provide a specific warning should a user select formatting the intel extended partition. Formatting this partition results in the loss of any subpartitions, and results in no usable partition. (as described in bug #9856). Change-Id: I6fb71f3329596217364f3be56b7ca225a1f26441 Reviewed-on: https://review.haiku-os.org/c/886 Reviewed-by: Stephan Aßmus <[email protected]>
This commit is contained in:
@@ -967,6 +967,7 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (diskSystem.IsFileSystem()) {
|
if (diskSystem.IsFileSystem()) {
|
||||||
|
BString intelExtendedPartition = "Intel Extended Partition";
|
||||||
if (disk->ID() == selectedPartition) {
|
if (disk->ID() == selectedPartition) {
|
||||||
snprintf(message, sizeof(message), B_TRANSLATE("Are you sure you "
|
snprintf(message, sizeof(message), B_TRANSLATE("Are you sure you "
|
||||||
"want to format a raw disk? (Most people initialize the disk "
|
"want to format a raw disk? (Most people initialize the disk "
|
||||||
@@ -978,6 +979,12 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
|
|||||||
"want to format the partition \"%s\"? You will be asked "
|
"want to format the partition \"%s\"? You will be asked "
|
||||||
"again before changes are written to the disk."),
|
"again before changes are written to the disk."),
|
||||||
partition->ContentName());
|
partition->ContentName());
|
||||||
|
} else if (partition->Type() == intelExtendedPartition) {
|
||||||
|
snprintf(message, sizeof(message), B_TRANSLATE("Are you sure you "
|
||||||
|
"want to format the Intel Extended Partition? Any "
|
||||||
|
"subpartitions it contains will be overwritten if you "
|
||||||
|
"continue. You will be asked again before changes are "
|
||||||
|
"written to the disk."));
|
||||||
} else {
|
} else {
|
||||||
snprintf(message, sizeof(message), B_TRANSLATE("Are you sure you "
|
snprintf(message, sizeof(message), B_TRANSLATE("Are you sure you "
|
||||||
"want to format the partition? You will be asked again "
|
"want to format the partition? You will be asked again "
|
||||||
|
|||||||
Reference in New Issue
Block a user