[PC-BSD Commits] r19919 - pcbsd/current/src-qt4/pc-mounttray

svn at pcbsd.org svn at pcbsd.org
Wed Oct 24 17:53:45 PDT 2012


Author: kenmoore
Date: 2012-10-25 00:53:44 +0000 (Thu, 25 Oct 2012)
New Revision: 19919

Modified:
   pcbsd/current/src-qt4/pc-mounttray/menuItem.cpp
Log:
Quick fix for a bug with using the "sectors" flag for finding initial device size.



Modified: pcbsd/current/src-qt4/pc-mounttray/menuItem.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-mounttray/menuItem.cpp	2012-10-24 19:43:38 UTC (rev 19918)
+++ pcbsd/current/src-qt4/pc-mounttray/menuItem.cpp	2012-10-25 00:53:44 UTC (rev 19919)
@@ -1,4 +1,3 @@
-
 #include <pcbsd-utils.h>
 #include "menuItem.h"
 
@@ -157,8 +156,13 @@
     kb = tmp[0].remove("hidden sectors").simplified().toInt();
   }else if( !tmp.filter("sectors").isEmpty()){
     tmp = tmp.filter("sectors");
-    qDebug() << "Det Sectors line:"<<tmp;
-    kb = tmp[0].remove("sectors").section("(",0,0).simplified().toInt();
+    //qDebug() << "Det Sectors line:"<<tmp;
+    int num=0;
+    for(int i=0; i<tmp.length(); i++){
+      int n = tmp[i].remove("sectors").section("(",0,0).simplified().toInt();
+      if(n > num){ num = n; }
+    }
+    kb = num;
   }else{ kb = -1; }
   maxsize->append( QString::number(kb) );
   



More information about the Commits mailing list