diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 8fd4c12..f14373b 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -1046,7 +1046,7 @@ void MainWindow::onImportPartitionTable() return; } - FileSystem* fs = FileSystemFactory::create(FileSystem::typeForName(fsName), firstSector, lastSector); + FileSystem* fs = FileSystemFactory::create(FileSystem::typeForName(fsName), firstSector, lastSector, device.logicalSize()); if (fs == nullptr) { KMessageBox::error(this, xi18nc("@info the partition is NOT a device path, just a number", "Could not create file system \"%1\" for partition %2 (line %3).", fsName, num, lineNo), xi18nc("@title:window", "Error While Importing Partition Table")); diff --git a/src/gui/newdialog.cpp b/src/gui/newdialog.cpp index 4be72be..207af43 100644 --- a/src/gui/newdialog.cpp +++ b/src/gui/newdialog.cpp @@ -157,7 +157,8 @@ void NewDialog::accept() partition().deleteFileSystem(); partition().setFileSystem(FileSystemFactory::create(FileSystem::Extended, partition().firstSector(), - partition().lastSector())); + partition().lastSector(), + partition().sectorSize())); } else if (partition().roles().has(PartitionRole::Luks)) { FileSystem::Type innerFsType = partition().fileSystem().type(); @@ -165,7 +166,8 @@ void NewDialog::accept() FS::luks* luksFs = dynamic_cast< FS::luks* >( FileSystemFactory::create(FileSystem::Luks, partition().firstSector(), - partition().lastSector())); + partition().lastSector(), + partition().sectorSize())); luksFs->createInnerFileSystem(innerFsType); luksFs->setPassphrase(dialogWidget().editPassphrase().password()); partition().setFileSystem(luksFs); @@ -215,7 +217,7 @@ void NewDialog::onRoleChanged(bool) void NewDialog::updateFileSystem(FileSystem::Type t) { partition().deleteFileSystem(); - partition().setFileSystem(FileSystemFactory::create(t, partition().firstSector(), partition().lastSector())); + partition().setFileSystem(FileSystemFactory::create(t, partition().firstSector(), partition().lastSector(), partition().sectorSize())); } void NewDialog::onFilesystemChanged(int idx) @@ -225,7 +227,7 @@ void NewDialog::onFilesystemChanged(int idx) setupConstraints(); updateOkButtonStatus(); - const FileSystem* fs = FileSystemFactory::create(FileSystem::typeForName(dialogWidget().comboFileSystem().currentText()), -1, -1, -1, QString()); + const FileSystem* fs = FileSystemFactory::create(FileSystem::typeForName(dialogWidget().comboFileSystem().currentText()), -1, -1, -1, -1, QString()); dialogWidget().m_EditLabel->setMaxLength(fs->maxLabelLength()); updateSpinCapacity(partition().length()); diff --git a/src/gui/partpropsdialog.cpp b/src/gui/partpropsdialog.cpp index a880034..3e1a7e5 100644 --- a/src/gui/partpropsdialog.cpp +++ b/src/gui/partpropsdialog.cpp @@ -187,7 +187,7 @@ void PartPropsDialog::setupFlagsList() void PartPropsDialog::updateHideAndShow() { // create a temporary fs for some checks - const FileSystem* fs = FileSystemFactory::create(newFileSystemType(), -1, -1, -1, QString()); + const FileSystem* fs = FileSystemFactory::create(newFileSystemType(), -1, -1, -1, -1, QString()); if (fs == nullptr || fs->supportSetLabel() == FileSystem::cmdSupportNone) { dialogWidget().label().setReadOnly(true); @@ -317,13 +317,13 @@ void PartPropsDialog::setupFileSystemComboBox() dialogWidget().fileSystem().setCurrentIndex(dialogWidget().fileSystem().findText(selected)); - const FileSystem* fs = FileSystemFactory::create(FileSystem::typeForName(dialogWidget().fileSystem().currentText()), -1, -1, -1, QString()); + const FileSystem* fs = FileSystemFactory::create(FileSystem::typeForName(dialogWidget().fileSystem().currentText()), -1, -1, -1, -1, QString()); dialogWidget().m_EditLabel->setMaxLength(fs->maxLabelLength()); } void PartPropsDialog::updatePartitionFileSystem() { - FileSystem* fs = FileSystemFactory::create(newFileSystemType(), partition().firstSector(), partition().lastSector()); + FileSystem* fs = FileSystemFactory::create(newFileSystemType(), partition().firstSector(), partition().lastSector(), partition().sectorSize()); partition().deleteFileSystem(); partition().setFileSystem(fs); dialogWidget().partWidget().update(); @@ -342,7 +342,7 @@ void PartPropsDialog::onFilesystemChanged(int) setWarnFileSystemChange(); updatePartitionFileSystem(); - const FileSystem* fs = FileSystemFactory::create(FileSystem::typeForName(dialogWidget().fileSystem().currentText()), -1, -1, -1, QString()); + const FileSystem* fs = FileSystemFactory::create(FileSystem::typeForName(dialogWidget().fileSystem().currentText()), -1, -1, -1, -1, QString()); dialogWidget().m_EditLabel->setMaxLength(fs->maxLabelLength()); } else { dialogWidget().fileSystem().disconnect(this);