From cdb6cbfa80601859a96cbfc0fd8f0f5c55147345 Mon Sep 17 00:00:00 2001 From: Jan Claeys Date: Sat, 16 Feb 2013 22:22:41 +0100 Subject: [PATCH] Work around faulty "complete disks" detection in mkdosfs (#693955) Add -I option to 'mkdosfs' command to work around faulty detection of "complete disks" vs. "partitions". Bug #693955 - mkdosfs detects "complete disk" vs. "partition" incorrectly Thanks to Kano for reporting this! (This will also be needed if GParted ever allows formatting a device without partitioning it.) --- src/fat16.cc | 2 +- src/fat32.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fat16.cc b/src/fat16.cc index 6b85b567..25e097c4 100644 --- a/src/fat16.cc +++ b/src/fat16.cc @@ -268,7 +268,7 @@ bool fat16::write_uuid( const Partition & partition, OperationDetail & operation bool fat16::create( const Partition & new_partition, OperationDetail & operationdetail ) { - return ! execute_command( "mkdosfs -F16 -v -n \"" + new_partition .get_label() + "\" " + new_partition .get_path(), operationdetail ) ; + return ! execute_command( "mkdosfs -F16 -v -I -n \"" + new_partition .get_label() + "\" " + new_partition .get_path(), operationdetail ) ; } bool fat16::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition ) diff --git a/src/fat32.cc b/src/fat32.cc index 3f4c0e59..ff36f92a 100644 --- a/src/fat32.cc +++ b/src/fat32.cc @@ -257,7 +257,7 @@ bool fat32::write_uuid( const Partition & partition, OperationDetail & operation bool fat32::create( const Partition & new_partition, OperationDetail & operationdetail ) { - return ! execute_command( "mkdosfs -F32 -v -n \"" + new_partition .get_label() + "\" " + new_partition .get_path(), operationdetail ) ; + return ! execute_command( "mkdosfs -F32 -v -I -n \"" + new_partition .get_label() + "\" " + new_partition .get_path(), operationdetail ) ; } bool fat32::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )