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

svn at pcbsd.org svn at pcbsd.org
Tue Dec 29 09:50:01 PST 2009


Author: kris
Date: 2009-12-29 09:50:01 -0800 (Tue, 29 Dec 2009)
New Revision: 5707

Modified:
   pcbsd/trunk/SysInstaller/backend.cpp
Log:

Updated SysInstaller, don't need to show Free Space in disk selection if its less than a usable
size, such as 3MB on some drives :)



Modified: pcbsd/trunk/SysInstaller/backend.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/backend.cpp	2009-12-29 14:58:06 UTC (rev 5706)
+++ pcbsd/trunk/SysInstaller/backend.cpp	2009-12-29 17:50:01 UTC (rev 5707)
@@ -352,25 +352,30 @@
 
                     // Check if we've found some free disk space
                     if (info.indexOf(dev + "-freemb: ") == 0) {
+                      bool ok;
+		      int checkSize;
                       ssize = info.replace(dev + "-freemb: ", "");
-                      // Figure out the next slice number, if its less than 4
-                      QString freeslice;
-                      tmp = lastslice;
-                      tmp = tmp.remove(0, tmp.size() - 1);
-                      bool ok;
-                      int nextslicenum = tmp.toInt(&ok);
-                      if ( ok ) {
-                         if ( nextslicenum < 4) {
-                          nextslicenum++;
-                          slice = dev + "s" + tmp.setNum(nextslicenum);
-                          slabel = "Unused Space";
-                          qDebug() << "Found Slice:" << dev << slice << slabel << ssize;
-                          partition.clear();
-                          partition << "SLICE" << dev << slice << ssize << slabel;   
-                          drives.append(partition);
-                         }
+                      checkSize = ssize.toInt(&ok); 
+                      if ( ok && checkSize > 100 )
+                      {
+                        // Figure out the next slice number, if its less than 4
+                        QString freeslice;
+                        tmp = lastslice;
+                        tmp = tmp.remove(0, tmp.size() - 1);
+                        int nextslicenum = tmp.toInt(&ok);
+                        if ( ok ) {
+                           if ( nextslicenum < 4) {
+                            nextslicenum++;
+                            slice = dev + "s" + tmp.setNum(nextslicenum);
+                            slabel = "Unused Space";
+                            qDebug() << "Found Slice:" << dev << slice << slabel << ssize;
+                            partition.clear();
+                            partition << "SLICE" << dev << slice << ssize << slabel;   
+                            drives.append(partition);
+                           }
+                        }
                       }
-                    }
+                    } // End of Free Space Check
                 }
             }
 



More information about the Commits mailing list