[PC-BSD Commits] r7114 - in pcbsd: current/SysInstaller stable/SysInstaller
svn at pcbsd.org
svn at pcbsd.org
Fri Jul 2 10:42:36 PDT 2010
Author: kris
Date: 2010-07-02 10:42:36 -0700 (Fri, 02 Jul 2010)
New Revision: 7114
Modified:
pcbsd/current/SysInstaller/sys-diskwidget.cpp
pcbsd/stable/SysInstaller/sys-diskwidget.cpp
Log:
Fixed a bug when installing the system with a dedicated "/boot" partition, that partition must be listed
in the configuration first, swap second, and the rest afterwards.
Modified: pcbsd/current/SysInstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/current/SysInstaller/sys-diskwidget.cpp 2010-07-02 17:28:50 UTC (rev 7113)
+++ pcbsd/current/SysInstaller/sys-diskwidget.cpp 2010-07-02 17:42:36 UTC (rev 7114)
@@ -520,7 +520,7 @@
{
QStringList tmpList;
QList<QStringList> copyList;
- QString tmp, workingDisk, workingSlice, tmpSlice, XtraTmp;
+ QString tmp, workingDisk, workingSlice, tmpSlice, XtraTmp, startPart;
int disk = 0;
// Copy over the list to a new variable we can mangle without modifying the original
@@ -576,13 +576,28 @@
tmpList << "# Avail FS Types, UFS, UFS+S, UFS+J, ZFS, SWAP";
tmpList << "# UFS.eli, UFS+S.eli, UFS+J.eli, ZFS.eli, SWAP.eli";
+ // If there is a dedicated /boot partition, need to list that first, see what is found
+ for (int i=0; i < copyList.count(); ++i) {
+ QStringList mounts = copyList.at(i).at(2).split(",");
+ for (int z = 0; z < mounts.size(); ++z) {
+ if ( copyList.at(i).at(0) == workingDisk \
+ && copyList.at(i).at(1) == workingSlice \
+ && mounts.at(z) == "/boot" )
+ startPart="/boot";
+ }
+ }
+
+ // If no dedicated /boot partition, then lets list "/" first
+ if(startPart.isEmpty())
+ startPart="/";
+
// Start by looking for the root partition
for (int i=0; i < copyList.count(); ++i) {
QStringList mounts = copyList.at(i).at(2).split(",");
for (int z = 0; z < mounts.size(); ++z) {
if ( copyList.at(i).at(0) == workingDisk \
&& copyList.at(i).at(1) == workingSlice \
- && mounts.at(z) == "/" ) {
+ && mounts.at(z) == startPart ) {
// Check if we have any extra arguments to throw on the end
XtraTmp="";
Modified: pcbsd/stable/SysInstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/stable/SysInstaller/sys-diskwidget.cpp 2010-07-02 17:28:50 UTC (rev 7113)
+++ pcbsd/stable/SysInstaller/sys-diskwidget.cpp 2010-07-02 17:42:36 UTC (rev 7114)
@@ -520,7 +520,7 @@
{
QStringList tmpList;
QList<QStringList> copyList;
- QString tmp, workingDisk, workingSlice, tmpSlice, XtraTmp;
+ QString tmp, workingDisk, workingSlice, tmpSlice, XtraTmp, startPart;
int disk = 0;
// Copy over the list to a new variable we can mangle without modifying the original
@@ -576,13 +576,28 @@
tmpList << "# Avail FS Types, UFS, UFS+S, UFS+J, ZFS, SWAP";
tmpList << "# UFS.eli, UFS+S.eli, UFS+J.eli, ZFS.eli, SWAP.eli";
+ // If there is a dedicated /boot partition, need to list that first, see what is found
+ for (int i=0; i < copyList.count(); ++i) {
+ QStringList mounts = copyList.at(i).at(2).split(",");
+ for (int z = 0; z < mounts.size(); ++z) {
+ if ( copyList.at(i).at(0) == workingDisk \
+ && copyList.at(i).at(1) == workingSlice \
+ && mounts.at(z) == "/boot" )
+ startPart="/boot";
+ }
+ }
+
+ // If no dedicated /boot partition, then lets list "/" first
+ if(startPart.isEmpty())
+ startPart="/";
+
// Start by looking for the root partition
for (int i=0; i < copyList.count(); ++i) {
QStringList mounts = copyList.at(i).at(2).split(",");
for (int z = 0; z < mounts.size(); ++z) {
if ( copyList.at(i).at(0) == workingDisk \
&& copyList.at(i).at(1) == workingSlice \
- && mounts.at(z) == "/" ) {
+ && mounts.at(z) == startPart ) {
// Check if we have any extra arguments to throw on the end
XtraTmp="";
More information about the Commits
mailing list