[PC-BSD Commits] r7115 - in pcbsd: current/SysInstaller stable/SysInstaller

svn at pcbsd.org svn at pcbsd.org
Fri Jul 2 10:49:21 PDT 2010


Author: kris
Date: 2010-07-02 10:49:21 -0700 (Fri, 02 Jul 2010)
New Revision: 7115

Modified:
   pcbsd/current/SysInstaller/sys-diskwidget.cpp
   pcbsd/stable/SysInstaller/sys-diskwidget.cpp
Log:

When saving partition layout, on last partition set size to "0" to use rest of disk / slice fully



Modified: pcbsd/current/SysInstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/current/SysInstaller/sys-diskwidget.cpp	2010-07-02 17:42:36 UTC (rev 7114)
+++ pcbsd/current/SysInstaller/sys-diskwidget.cpp	2010-07-02 17:49:21 UTC (rev 7115)
@@ -520,7 +520,7 @@
 {
   QStringList tmpList;
   QList<QStringList> copyList;
-  QString tmp, workingDisk, workingSlice, tmpSlice, XtraTmp, startPart;
+  QString tmp, workingDisk, workingSlice, tmpSlice, XtraTmp, startPart, sliceSize;
   int disk = 0;
 
   // Copy over the list to a new variable we can mangle without modifying the original
@@ -663,9 +663,15 @@
         if ( ! copyList.at(i).at(5).isEmpty() )
           XtraTmp=" (" + copyList.at(i).at(5) + ")" ;
 
+	// If we are working on the last partition, set the size to 0 to use remaining disk
+	if ( i == count ) 
+		sliceSize = "0";
+	else
+		sliceSize=copyList.at(i).at(4);
+
         // Write the partition line
         tmpList << "disk" + tmp.setNum(disk) + "-part=" \
-                 + copyList.at(i).at(3) + " " + copyList.at(i).at(4) \
+                 + copyList.at(i).at(3) + " " + sliceSize \
                  + " " + copyList.at(i).at(2) + XtraTmp;
 
         // Check if we have an encryption passphrase to use

Modified: pcbsd/stable/SysInstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/stable/SysInstaller/sys-diskwidget.cpp	2010-07-02 17:42:36 UTC (rev 7114)
+++ pcbsd/stable/SysInstaller/sys-diskwidget.cpp	2010-07-02 17:49:21 UTC (rev 7115)
@@ -520,7 +520,7 @@
 {
   QStringList tmpList;
   QList<QStringList> copyList;
-  QString tmp, workingDisk, workingSlice, tmpSlice, XtraTmp, startPart;
+  QString tmp, workingDisk, workingSlice, tmpSlice, XtraTmp, startPart, sliceSize;
   int disk = 0;
 
   // Copy over the list to a new variable we can mangle without modifying the original
@@ -663,9 +663,15 @@
         if ( ! copyList.at(i).at(5).isEmpty() )
           XtraTmp=" (" + copyList.at(i).at(5) + ")" ;
 
+	// If we are working on the last partition, set the size to 0 to use remaining disk
+	if ( i == count ) 
+		sliceSize = "0";
+	else
+		sliceSize=copyList.at(i).at(4);
+
         // Write the partition line
         tmpList << "disk" + tmp.setNum(disk) + "-part=" \
-                 + copyList.at(i).at(3) + " " + copyList.at(i).at(4) \
+                 + copyList.at(i).at(3) + " " + sliceSize \
                  + " " + copyList.at(i).at(2) + XtraTmp;
 
         // Check if we have an encryption passphrase to use



More information about the Commits mailing list