[gparted] Work around faulty "complete disks" detection in mkdosfs (#693955)



commit cdb6cbfa80601859a96cbfc0fd8f0f5c55147345
Author: Jan Claeys <devel janc be>
Date:   Sat Feb 16 22:22:41 2013 +0100

    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 6b85b56..25e097c 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 3f4c0e5..ff36f92 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 )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]