Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=6d8b8f89f513f92d5fed47a13c6307ac5eac98c0

commit 6d8b8f89f513f92d5fed47a13c6307ac5eac98c0
Author: James Buren <[email protected]>
Date:   Mon Aug 27 17:31:48 2012 -0500

when creating a regular DOS partition, abort if an extended partition is found.

diff --git a/Device.cc b/Device.cc
index bb3507b..b0b6d0f 100644
--- a/Device.cc
+++ b/Device.cc
@@ -271,6 +271,11 @@ Partition *Device::newPartition(unsigned long long size)
if(sectors > usable_sectors || (label == "dos" && (last+1) > 4) || (label == 
"gpt" && (last+1) > 128))
return 0;

+  if(last > 0 && label == "dos")
+    for( size_t n = 0 ; n < last ; ++n )
+      if(_table->getPartition(n)->getPurpose() == "extended")
+        return 0;
+
part = _table->newPartition();

if(last == 0)
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to