[PC-BSD Commits] r5593 - pcbsd/trunk/SysInstaller

svn at pcbsd.org svn at pcbsd.org
Mon Dec 14 09:43:58 PST 2009


Author: kris
Date: 2009-12-14 09:43:58 -0800 (Mon, 14 Dec 2009)
New Revision: 5593

Modified:
   pcbsd/trunk/SysInstaller/sys-diskwidget.cpp
Log:

Fixed a bug when doing an install to "Unused Space" need to set partition=free when doing so in the
pc-sysinstall cfg



Modified: pcbsd/trunk/SysInstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sys-diskwidget.cpp	2009-12-14 17:01:38 UTC (rev 5592)
+++ pcbsd/trunk/SysInstaller/sys-diskwidget.cpp	2009-12-14 17:43:58 UTC (rev 5593)
@@ -393,7 +393,7 @@
 {
   QStringList tmpList;
   QList<QStringList> copyList;
-  QString tmp, workingDisk, workingSlice;
+  QString tmp, workingDisk, workingSlice, tmpSlice;
   int disk = 0;
 
   // Copy over the list to a new variable we can mangle without modifying the original
@@ -407,10 +407,19 @@
   {
     workingDisk = copyList.at(0).at(0);
     workingSlice = copyList.at(0).at(1);
+    tmpSlice = workingSlice;
     tmpList << "# Disk Setup for " + workingDisk ;
 
+    // Check if this is an install to "Unused Space"
+    for (int z=0; z < sysDisks.count(); ++z)
+      if ( sysDisks.at(z).at(0) == "SLICE" \
+        && sysDisks.at(z).at(1) == workingDisk \
+        && sysDisks.at(z).at(2) == workingSlice \
+        && sysDisks.at(z).at(4) == "Unused Space" )
+          tmpSlice = "free";
+
     tmpList << "disk" + tmp.setNum(disk) + "=" + workingDisk;
-    tmpList << "partition=" + workingSlice;
+    tmpList << "partition=" + tmpSlice;
     if ( checkBootLoader->isChecked() )
       tmpList << "bootManager=bsd";
     else



More information about the Commits mailing list