[PC-BSD Commits] r7622 - pcbsd/current/src-qt4/pc-sysinstaller
svn at pcbsd.org
svn at pcbsd.org
Wed Sep 22 12:01:54 PDT 2010
Author: kris
Date: 2010-09-22 12:01:53 -0700 (Wed, 22 Sep 2010)
New Revision: 7622
Modified:
pcbsd/current/src-qt4/pc-sysinstaller/dialogFileSystem.cpp
pcbsd/current/src-qt4/pc-sysinstaller/sys-diskwidget.cpp
pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui
Log:
Added support for "UFS+SUJ" to the gui, and also created some radio buttons to select the file-system you
want to use for auto-partitioning.
Modified: pcbsd/current/src-qt4/pc-sysinstaller/dialogFileSystem.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/dialogFileSystem.cpp 2010-09-22 17:44:28 UTC (rev 7621)
+++ pcbsd/current/src-qt4/pc-sysinstaller/dialogFileSystem.cpp 2010-09-22 19:01:53 UTC (rev 7622)
@@ -46,6 +46,7 @@
// Add the file-system types
comboDiskType->addItem("UFS");
comboDiskType->addItem("UFS+S");
+ comboDiskType->addItem("UFS+SUJ");
comboDiskType->addItem("UFS+J");
comboDiskType->addItem("ZFS");
comboDiskType->addItem("SWAP");
Modified: pcbsd/current/src-qt4/pc-sysinstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sys-diskwidget.cpp 2010-09-22 17:44:28 UTC (rev 7621)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sys-diskwidget.cpp 2010-09-22 19:01:53 UTC (rev 7622)
@@ -380,39 +380,71 @@
mntsize = 2048;
else
mntsize = 512;
- fileSystem << targetDisk << targetSlice << "/" << "UFS+S" << tmp.setNum(mntsize) << "" << "";
- totalSize = totalSize - mntsize;
- qDebug() << "Auto-Gen FS:" << fileSystem;
- sysFinalDiskLayout << fileSystem;
- fileSystem.clear();
+
+ if ( radioFileSysSUJ->isChecked() || radioFileSysSU->isChecked() )
+ {
+ QString fsType;
+
+ if ( radioFileSysSUJ->isChecked() )
+ fsType="UFS+SUJ";
+ else
+ fsType="UFS+S";
+
+ fileSystem << targetDisk << targetSlice << "/" << fsType << tmp.setNum(mntsize) << "" << "";
+ totalSize = totalSize - mntsize;
+ qDebug() << "Auto-Gen FS:" << fileSystem;
+ sysFinalDiskLayout << fileSystem;
+ fileSystem.clear();
- // Figure out the swap size, try for 2xPhysMem first, fallback to 512 if not enough space
- mntsize = systemMemory * 2;
- if ( totalSize - mntsize < 3000 )
- mntsize = 512;
- fileSystem << targetDisk << targetSlice << "SWAP" << "SWAP" << tmp.setNum(mntsize) << "" << "";
- totalSize = totalSize - mntsize;
- qDebug() << "Auto-Gen FS:" << fileSystem;
- sysFinalDiskLayout << fileSystem;
- fileSystem.clear();
+ // Figure out the swap size, try for 2xPhysMem first, fallback to 512 if not enough space
+ mntsize = systemMemory * 2;
+ if ( totalSize - mntsize < 3000 )
+ mntsize = 512;
+ fileSystem << targetDisk << targetSlice << "SWAP" << "SWAP" << tmp.setNum(mntsize) << "" << "";
+ totalSize = totalSize - mntsize;
+ qDebug() << "Auto-Gen FS:" << fileSystem;
+ sysFinalDiskLayout << fileSystem;
+ fileSystem.clear();
- // Figure out the default size for /var if we are on FreeBSD / PC-BSD
- mntsize = 1024;
- fileSystem << targetDisk << targetSlice << "/var" << "UFS+S" << tmp.setNum(mntsize) << "" << "";
- totalSize = totalSize - mntsize;
- qDebug() << "Auto-Gen FS:" << fileSystem;
- sysFinalDiskLayout << fileSystem;
- fileSystem.clear();
+ // Figure out the default size for /var if we are on FreeBSD / PC-BSD
+ mntsize = 1024;
+ fileSystem << targetDisk << targetSlice << "/var" << fsType << tmp.setNum(mntsize) << "" << "";
+ totalSize = totalSize - mntsize;
+ qDebug() << "Auto-Gen FS:" << fileSystem;
+ sysFinalDiskLayout << fileSystem;
+ fileSystem.clear();
- // Now use the rest of the disk / slice for /usr
- fileSystem << targetDisk << targetSlice << "/usr" << "UFS+S" << tmp.setNum(totalSize) << "" << "";
- qDebug() << "Auto-Gen FS:" << fileSystem;
- sysFinalDiskLayout << fileSystem;
- fileSystem.clear();
+ // Now use the rest of the disk / slice for /usr
+ fileSystem << targetDisk << targetSlice << "/usr" << fsType << tmp.setNum(totalSize) << "" << "";
+ qDebug() << "Auto-Gen FS:" << fileSystem;
+ sysFinalDiskLayout << fileSystem;
+ fileSystem.clear();
+ } else {
+ // Using ZFS
+
+ // Figure out the swap size, try for 2xPhysMem first, fallback to 512 if not enough space
+ int swapsize = systemMemory * 2;
+ if ( totalSize - swapsize < 3000 )
+ swapsize = 512;
+ totalSize = totalSize - swapsize;
+
+ // Add the main zfs pool with standard partitions
+ fileSystem << targetDisk << targetSlice << "/,/var,/usr" << "ZFS" << tmp.setNum(totalSize) << "" << "";
+ qDebug() << "Auto-Gen FS:" << fileSystem;
+ sysFinalDiskLayout << fileSystem;
+ fileSystem.clear();
+
+ // Add the previously calculated swap size
+ fileSystem << targetDisk << targetSlice << "SWAP" << "SWAP" << tmp.setNum(swapsize) << "" << "";
+ qDebug() << "Auto-Gen FS:" << fileSystem;
+ sysFinalDiskLayout << fileSystem;
+ fileSystem.clear();
+ }
+
// Update the custom widget with this partition information
slotRefreshCustomPartitionWidget();
@@ -581,8 +613,8 @@
// Now print the partition section for this slice
tmpList << "# Partition Setup for " + workingDisk + "(" + workingSlice + ")";
tmpList << "# All sizes are expressed in MB";
- tmpList << "# Avail FS Types, UFS, UFS+S, UFS+J, ZFS, SWAP";
- tmpList << "# UFS.eli, UFS+S.eli, UFS+J.eli, ZFS.eli, SWAP.eli";
+ tmpList << "# Avail FS Types, UFS, UFS+S, UFS+SUJ, UFS+J, ZFS, SWAP";
+ tmpList << "# UFS.eli, UFS+S.eli, UFS+SUJ, 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) {
Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui 2010-09-22 17:44:28 UTC (rev 7621)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui 2010-09-22 19:01:53 UTC (rev 7622)
@@ -22,14 +22,11 @@
<property name="styleSheet">
<string notr="true">background-color: rgb(229, 229, 229);</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="spacing">
- <number>0</number>
- </property>
+ <layout class="QGridLayout" name="gridLayout_28">
<property name="margin">
<number>0</number>
</property>
- <item>
+ <item row="0" column="0">
<widget class="QWidget" name="headerWidget" native="true">
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0.7, stop:0 rgba(229, 229, 229, 255), stop:1 rgba(255, 255, 255, 255));</string>
@@ -106,7 +103,7 @@
</layout>
</widget>
</item>
- <item>
+ <item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>0</number>
@@ -212,7 +209,7 @@
</item>
</layout>
</item>
- <item>
+ <item row="2" column="0">
<widget class="QWidget" name="baseWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@@ -996,7 +993,7 @@
</palette>
</property>
<property name="currentIndex">
- <number>9</number>
+ <number>2</number>
</property>
<widget class="QWidget" name="aiStep0">
<property name="palette">
@@ -7138,7 +7135,7 @@
<item row="2" column="0" colspan="2">
<widget class="QStackedWidget" name="stackedWidgetNetOptions">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="stackedWidgetNetOptionsPage1">
<layout class="QGridLayout" name="gridLayout_8">
@@ -8124,8 +8121,8 @@
</layout>
</widget>
<widget class="QWidget" name="aiStep3">
- <layout class="QGridLayout" name="gridLayout_28">
- <item row="0" column="0" rowspan="6">
+ <layout class="QGridLayout" name="gridLayout_30">
+ <item row="0" column="0" rowspan="5">
<spacer name="horizontalSpacer_15">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -8138,41 +8135,28 @@
</property>
</spacer>
</item>
- <item row="0" column="2">
- <spacer name="verticalSpacer_29">
+ <item row="1" column="1">
+ <spacer name="horizontalSpacer_6">
<property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>528</width>
- <height>4</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="4" rowspan="4">
- <spacer name="horizontalSpacer_37">
- <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>43</width>
- <height>435</height>
+ <width>56</width>
+ <height>28</height>
</size>
</property>
</spacer>
</item>
- <item row="1" column="1">
- <spacer name="horizontalSpacer_6">
+ <item row="0" column="2">
+ <spacer name="verticalSpacer_29">
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>56</width>
- <height>28</height>
+ <width>528</width>
+ <height>4</height>
</size>
</property>
</spacer>
@@ -8256,7 +8240,20 @@
</property>
</spacer>
</item>
- <item row="2" column="1" colspan="3">
+ <item row="0" column="4" rowspan="4">
+ <spacer name="horizontalSpacer_37">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>43</width>
+ <height>435</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="1" colspan="2">
<spacer name="verticalSpacer_28">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -8269,12 +8266,31 @@
</property>
</spacer>
</item>
- <item row="3" column="1" colspan="3">
+ <item row="3" column="1" colspan="2">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_27">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_26">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0.7, stop:0 rgba(217, 230, 235, 230), stop:1 rgba(255, 255, 255, 255));</string>
+ </property>
+ <property name="text">
+ <string>Disk Layout</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout_9">
<property name="spacing">
@@ -8413,6 +8429,54 @@
</widget>
</item>
<item row="3" column="0">
+ <widget class="QLabel" name="label_33">
+ <property name="text">
+ <string>File-system for auto-partitioning. If unsure, please leave at the default.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_13">
+ <item>
+ <widget class="QRadioButton" name="radioFileSysSUJ">
+ <property name="text">
+ <string>UFS + SoftUpdates Journaling</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioFileSysSU">
+ <property name="text">
+ <string>UFS + SoftUpdates</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioFileSysZFS">
+ <property name="text">
+ <string>ZFS</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_44">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="5" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<spacer name="horizontalSpacer_40">
@@ -8451,7 +8515,7 @@
</item>
</layout>
</item>
- <item row="4" column="0">
+ <item row="6" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -8632,25 +8696,6 @@
</item>
</layout>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_26">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="styleSheet">
- <string notr="true">background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0.7, stop:0 rgba(217, 230, 235, 230), stop:1 rgba(255, 255, 255, 255));</string>
- </property>
- <property name="text">
- <string>Disk Layout</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
</layout>
</widget>
</item>
@@ -8740,19 +8785,6 @@
</item>
</layout>
</item>
- <item row="7" column="1" colspan="3">
- <spacer name="verticalSpacer_26">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
<widget class="QWidget" name="aiStep4">
@@ -9906,7 +9938,7 @@
</layout>
</widget>
</item>
- <item>
+ <item row="3" column="0">
<widget class="QWidget" name="footerWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
More information about the Commits
mailing list