Commit Graph

329 Commits

Author SHA1 Message Date
Andrius Štikonas fd4a330887 Allow setting empty FAT label.
This breaks compatibility with dosfstools 4.1

BUG: 453388
2022-05-15 23:20:25 +01:00
Andrius Štikonas 08d2e3dc2c Changing swap labels while swap is active does not seem to work anymore. 2022-01-15 23:14:49 +00:00
Andrius Štikonas e58ab02bac Add support for copying unknown partitions.
BUG: 447784
2022-01-01 16:18:57 +00:00
Tomaz Canabrava 770e16eb02 Use --recursive instead of -r 2021-12-28 15:07:35 +00:00
Tomaz Canabrava 36bb57c0dd Add posix permissions on filesystems used in posix systems 2021-12-28 15:07:35 +00:00
Tomaz Canabrava 9093b27bd8 Move the changePosixPermission to the Filesystem
And implement it on ext2, 3, 4. I don't know all the filesystems
that can have posix permissions, those three will do. if we need
more in the future we implement them, it's two lines of code.
2021-12-28 15:07:35 +00:00
Andrius Štikonas a5bdd5a4eb Switch to ntfsinfo to read NTFS usage.
BUG: 447248
2021-12-24 00:03:05 +00:00
Andrius Štikonas 282cfdcde1 Do not destroy zfs pool when removing zfs partition.
This can be dangerous, e.g. if partition is part of raid set.
So better be more cautious and in some cases fail to remove partition
than lose data.
2021-10-30 21:13:09 +01:00
Guillaume Girol 0094461f60 lvm without arguments has returncode 3 2021-02-27 12:00:00 +00:00
Andrius Štikonas 36dfae351f Add initial support for dosfstools 4.2.
Empty labels are not allowed anymore.
One can reset them with -r flag but that is not supported in older
dosfstools. So for now we just manually set label to NO_LABEL.

BUG: 432941
2021-02-19 17:51:43 +00:00
Andrius Štikonas 06f15334ec Add support for exfatprogs
Bug: 430907
2020-12-28 17:50:07 +00:00
Andrius Štikonas 19f78ef76a Port away from qAsConst. 2020-10-24 22:01:45 +01:00
Andrius Štikonas 7ecdaf3ac8 Fix resizing of fat partitions.
Workaround a bug in fatresize (or libparted) where resizing to
partition length failed. Instead try to resize to length - 1.

BUG: 407834
2020-10-04 22:21:58 +01:00
Andrius Štikonas 4819eec59b Allow moving partitions with unknown file system.
BUG: 404398
2020-10-04 21:18:08 +01:00
Andrius Štikonas 0c25d1f9c4 Use QFile::decodeFileName for decoding device node names.
BUG: 384321
2020-10-01 23:51:59 +01:00
Andrius Štikonas d68ffeadef REUSE: SPDX style license headers for src/util. 2020-10-01 00:33:19 +01:00
Andrius Štikonas 8534265421 REUSE: SPDX headers for src/fs/*. 2020-09-28 00:51:18 +01:00
Andrius Štikonas fc826690b9 SPDX licenses for tests and CMakeLists.txt. 2020-09-17 02:15:16 +01:00
Andrius Štikonas a810d0d2fd Merge branch 'gportay/kpmcore-update-filesystem-features-api' 2020-03-22 01:24:57 +00:00
Gaël PORTAY 9d6c98ff4a Replace FSFeature by QVariantMap
The object QVariant is a native object in the Qt world that represents
any type of value: boolean, integer, string, floating point, date,
UUID...

This change updates the API to use the object QVariant and provide a
more flexible API to represent the filesystem features.
2020-03-21 18:09:01 -04:00
Yuri Chornoivan 62aaa90a29
Fix minor EBN issues 2020-03-21 11:22:15 +00:00
Andrius Štikonas efb970ba11 Add a missing features.h include. 2020-02-08 22:01:24 +00:00
Arnaud Ferraris d24191ebd8 Add support for filesystem-specific features
In some cases, it may be necessary to create a filesystem with specific features
enabled/disabled.

This PR makes it possible to create filesystems this way. It does so
by introducing a new m_Features member variable and the createWithFeatures()
function to the FileSystem base class. The latter function is implemented
for the btrfs, ext2/3/4 and FAT filesystems.

Additionnally, the CreateFileSystemJob has been modified to enable
creating/formatting filesystems with specific features enabled.

Differential Revision: https://phabricator.kde.org/D21903
CCBUG: 342178
2020-01-12 11:58:32 +00:00
Yuri Chornoivan 2980b21b8d Update references 2019-11-22 15:45:04 +02:00
Andrius Štikonas bb7bf3ca03 Make FileSystemFactory::init reentrant.
BUG: 413927
2019-11-18 22:45:58 +02:00
Andrius Štikonas 2c7b3f2bfa Fix resizing of encrypted partitions.
BUG: 413883
2019-11-18 21:16:05 +02:00
Shubham Jangra 6ea88cc737 Add QString include 2019-06-12 22:18:08 +05:30
Shubham Jangra d1a82f65d4 Revert "Remove redundant includes and refactor"
This reverts commit 4229b02fd2.
2019-06-12 22:11:11 +05:30
Shubham Jangra 4229b02fd2 Remove redundant includes and refactor 2019-06-10 23:07:06 +05:30
Shubham Jangra ef20244be5 Add support for Minix(Mini Unix) Filesystem
Reviewers: stikonas, cjlcarvalho

Reviewed By: stikonas

Subscribers: cjlcarvalho, #kde_partition_manager

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D21652
2019-06-09 00:01:30 +05:30
Andrius Štikonas dd0adbec42
Remove unused include. 2019-04-06 17:36:25 +01:00
Andrius Štikonas ecb78121f3
Allow moving partitions of unknown type.
This usually be safe. There is a theoretical chance that some
unknown OS fails to boot, but I'm not aware of any such cases.

BUG: 404398
2019-02-15 19:16:07 +00:00
Andrius Štikonas 559c326be7 Add detection support for Apple File System (APFS). 2019-01-13 17:34:05 +00:00
Andrius Štikonas e749b01b8e Fix a typo in filesystem support dialog.
BitLocker was mixed up with btrfs.

CCBUG: 392892
2019-01-13 13:16:44 +00:00
Andrius Štikonas 708318a5ad Add BitLocker detection support.
CCBUG: 392892
2019-01-13 02:24:18 +00:00
Andrius Štikonas 80f5a32dc0 Remove remaining cases of call to dd binary.
BUG: 398154
2018-11-29 22:32:07 +00:00
Andrius Štikonas 09e4d47e07 Do not use external process dd.
BUG: 398154
2018-11-25 20:50:22 +00:00
Andrius Štikonas b893a39223 Use the same executable name in findExternal and ExecuteCommand
Even if they are symlinked, only one name was whitelisted.
2018-08-23 21:45:30 +01:00
Andrius Štikonas 2579d04229 Remove ExternalCommand::waitFor.
This is no longer used with KAuth.
ExternalCommand::start now waits until command finishes.
2018-07-21 21:19:34 +01:00
Caio Carvalho 2298d08c41 Adding support for detecting linux_raid_member file system. 2018-07-15 17:38:43 -03:00
Andrius Štikonas b11b73b1e5 Remove extra semicolon after Q_UNUSED. 2018-07-12 00:12:43 +01:00
Caio Carvalho 9e6cf4063a - Refactoring LVM::pvList to be a class with static QList<LvmPV> attribute instead of extern instance.
- Moving LVM VG verification in canShrink, canMove, canGrow to isLVMPVinNewlyVG method at ResizeOperation.
- Don't grow LVM PVs that are being targeted by CreateVolumeGroupOperations.
2018-05-09 04:09:17 -03:00
Andrius Štikonas 40f59a4870 Rename LUKS open and close Labels to "Lock" and "Unlock"
BUG: 393409
2018-04-23 11:05:44 +03:00
Andrius Štikonas a43d5bbc5b fatresize is libparted based, so does not support FAT12. 2018-04-16 11:32:29 +03:00
Andrius Štikonas 99c14ad074 Correctly report when excutable is not found. 2018-04-16 11:06:13 +03:00
Andrius Štikonas 4b1793f79b Update backend name in the docs. 2018-04-15 01:09:48 +03:00
Andrius Štikonas 9e107c8136 Add forgotten files. 2018-04-11 15:14:17 +03:00
Andrius Štikonas 622def3b56 Convert more enums to scoped enums. 2018-04-09 15:14:34 +01:00
Andrius Štikonas 2e5f0fbcb2 d-pointerize FileSystem class. 2018-04-08 01:46:08 +01:00
Andrius Štikonas 17c8772240 Explicitely specify the scope of enum. 2018-04-07 19:54:30 +01:00