From 2876fb7c18d9e31813e8f5f7d7bb90dd2b0851bd Mon Sep 17 00:00:00 2001 From: Rob Gill Date: Mon, 21 Jan 2019 20:20:46 +1000 Subject: [PATCH] apps/DriveSetup Warn before formatting Intel extended Partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- src/apps/drivesetup/MainWindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/apps/drivesetup/MainWindow.cpp b/src/apps/drivesetup/MainWindow.cpp index 165ac3007f..bd0417ff93 100644 --- a/src/apps/drivesetup/MainWindow.cpp +++ b/src/apps/drivesetup/MainWindow.cpp @@ -967,6 +967,7 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition, } if (diskSystem.IsFileSystem()) { + BString intelExtendedPartition = "Intel Extended Partition"; if (disk->ID() == selectedPartition) { snprintf(message, sizeof(message), B_TRANSLATE("Are you sure you " "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 " "again before changes are written to the disk."), 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 { snprintf(message, sizeof(message), B_TRANSLATE("Are you sure you " "want to format the partition? You will be asked again "