Commit Graph

1162 Commits

Author SHA1 Message Date
Andrius Štikonas 3e31ec1431 Fix free space handling when resizing LVM LVs.
BUG: 399772
2018-10-14 00:02:06 +01:00
l10n daemon script 5dc4986bc9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-10-10 06:21:45 +02:00
l10n daemon script 911d43be57 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-10-07 06:01:12 +02:00
Andrius Štikonas 4080eef0ba Set FlagBoot = FlagEsp and deprecate it. 2018-09-01 21:27:05 +01:00
Andrius Štikonas f4cd7dd953 Use C++14 style deprecated attributes. 2018-09-01 18:52:15 +01:00
Andrius Štikonas 046f17fa68 sfdisk: Make FlagEsp alias for FlagBoot 2018-09-01 18:40:10 +01:00
Caio Carvalho 7853424a62 Use std::find instead of iterating to search in allowedCommands. 2018-08-24 12:14:49 -03:00
l10n daemon script f8cdf99606 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-24 05:42:47 +02: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 ee8ee70df9 Use Separate output and error channels for sfdisk --json.
Without this, error output would make json invalid.
2018-08-22 00:30:13 +01:00
Simon Depiets e74fcb29e4 Fix parameters and markers in xi18n call
Reviewers: #kde_partition_manager

Subscribers: stikonas

Tags: #kde_partition_manager

Differential Revision: https://phabricator.kde.org/D14968
2018-08-21 17:18:02 +08:00
l10n daemon script cbaf62427f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-18 05:42:22 +02:00
Caio Carvalho 84c742404d Check if command string is empty in ExternalCommand::start 2018-08-16 23:42:43 +02:00
Caio Carvalho 6c703e122a Checking if the command is not an empty string. 2018-08-16 23:42:21 +02:00
l10n daemon script e743156888 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-16 05:29:54 +02:00
Andrius Štikonas eb099bd477 Add command whitelist to kpmcore kauth helper. 2018-08-11 20:32:02 +01:00
Andrius Štikonas 449dc1f517 Revert "Do not link to externalcommand.h in kpmcore_externalcommand"
This reverts commit 29dcd08e70.
2018-08-08 13:35:30 +00:00
l10n daemon script c23fbc0c24 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-08 05:44:25 +02:00
l10n daemon script b0663ba1b5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-07 05:44:32 +02:00
Andrius Štikonas 29dcd08e70 Do not link to externalcommand.h in kpmcore_externalcommand 2018-08-06 20:47:53 +01:00
Harald Sitter 87dc44dab8 use QDBusServiceWatcher instead of pinging the client
Summary:
the motivation here is to terminate the "server" helper when the client
disappears. dbus supports this use case natively via service registration
events which we can easily handle via QDBusServiceWatcher.
instead of repeatedly poking the client we'll simply monitor its dbus
service now. this is cheaper, less code and doesn't risk timing out
randomly.

Test Plan:
- on neon ISO build kpmcore & calamares & pm
- calamares manages to actually partition stuff
- partitionmanager also starts properly

- also the same again on the installed system.

Reviewers: stikonas, bshah

Reviewed By: bshah

Subscribers: bshah

Differential Revision: https://phabricator.kde.org/D14646
2018-08-06 15:46:11 +02:00
l10n daemon script 4f699fbc01 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-06 05:33:12 +02:00
Andrius Štikonas 872715f4e0 Switch DBus calls to classes generated from XML. 2018-08-05 21:15:33 +01:00
l10n daemon script c9258f74c0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-05 05:29:30 +02:00
Andrius Štikonas a7b640da4c Delay creation of QEventLoop object until after QCoreApplication starts
Fixes: QEventLoop: Cannot be used without QApplication
2018-08-03 19:49:32 +01:00
l10n daemon script 67e943713b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-03 05:37:12 +02:00
l10n daemon script 5103d1fcc0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-02 05:28:03 +02:00
l10n daemon script 9515090157 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-08-01 05:50:40 +02:00
Andrius Štikonas 3524977006 Fix a typo in the comment. 2018-08-01 00:58:24 +01:00
l10n daemon script 0201171956 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-07-31 05:43:22 +02:00
Andrius Štikonas 4b022c33f0 Rename "Disk Device" to Device in a user visible string.
kpmcore's enum DiskDevice is not what end user might think is Disk.
E.g. USB flash drive would also be Disk Device for kpmcore purposes.
2018-07-30 19:15:09 +01:00
Andrius Štikonas d6beb862e6 Reword description of KAuth action. 2018-07-30 19:10:12 +01:00
l10n daemon script 184702fc1a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-07-30 05:24:01 +02:00
l10n daemon script 0ee516b2f2 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-07-29 05:31:06 +02:00
l10n daemon script 9faece8d28 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-07-28 05:33:45 +02:00
l10n daemon script 4828645e18 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-07-27 05:33:54 +02:00
Andrius Štikonas 24d9d1bd73 Merge branch 'kauth' 2018-07-25 09:37:52 +00:00
Andrius Štikonas 4fcbb540e0 Fix unallocated space calculation in the presence of LVM RAID partitions.
BUG: 396776
2018-07-24 21:39:55 +01:00
Caio Carvalho 8b28001ae2 Pausing udev events during commit of RAID partition tables to map its logical partitions. 2018-07-24 03:12:02 -03:00
Andrius Štikonas 700dddb875 Do not reassemble RAID devices after partition table commit.
Reassembling RAID devices causes devices to disappear and
reappear with a different name.
2018-07-23 22:54:11 +01:00
Caio Carvalho 4b723be585 Adding LvmDevice::s_OrphanPVs shared list to store PVs paths that are member of VGs that will be deleted soon. 2018-07-23 13:34:40 -03:00
Andrius Štikonas 75bfd09c9c Fix detection of NTFS partitions
BUG: 396749
2018-07-22 12:42:10 +01:00
Andrius Štikonas 3d6aa8c333 Remove ExternalCommand::onFinished. 2018-07-21 21:29:36 +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
Andrius Štikonas 938ec7fa8b Make ExternalCommandHelper::getNonce() reentrant.
Store previously generated values of nonce, and remove them from
the container when they are used.

BUG: 396312
2018-07-21 11:03:25 +01:00
Andrius Štikonas c50e04c9d1 Use cryptographic nonce instead of counters. 2018-07-20 21:12:13 +01:00
Andrius Štikonas 985b353146 Use QString::back(). 2018-07-18 23:23:34 +01:00
Andrius Štikonas 3f65e94659 Return false when external command helper reports failure. 2018-07-18 21:40:39 +01:00
Caio Carvalho 64419caa8d Add chunk size for RAID 1 arrays. 2018-07-16 15:39:47 -03:00
Caio Carvalho 9138e02726 Operations should check LvmDevice::s_DirtyPVs instead of check pending CreateVolumeGroupOperations to search for newly LVM PVs. 2018-07-15 19:41:44 -03:00
Caio Carvalho c1e393240b Using QFile instead of calling ExternalCommand to read /proc/mdstat and mdadm.conf files. 2018-07-15 19:38:33 -03:00
Caio Carvalho 2298d08c41 Adding support for detecting linux_raid_member file system. 2018-07-15 17:38:43 -03:00
Caio Carvalho 3fd221f794 Ranged-for in availableInConf const copy.
All the scanned devices should be added to devices list.
2018-07-15 16:36:43 -03:00
Caio Carvalho a508cfbc83 Avoiding pointer comparison. 2018-07-15 15:51:23 -03:00
Andrius Štikonas e5b63b0d6f Fix support for QProcess::ProcessChannelMode. 2018-07-15 17:37:29 +01:00
Caio Carvalho e761c131d0 Changing prettyName for RAID devices with Resync/Recovery status. 2018-07-15 13:21:12 -03:00
Caio Carvalho f3fac7eac7 Add SoftwareRAID::Status enum.
Check for RAID before modelCommand in SfdiskBackend::scanDevice.
2018-07-15 13:11:50 -03:00
Caio Carvalho fae6cd4d61 RAID 0 devices don't need to check for resync/recovery progress. 2018-07-15 12:10:19 -03:00
Caio Carvalho dff99ffcf5 Support RAID devices which are in resync/recovery process after its creation/assemble.
Revert modelCommand.output().trimmed().isEmpty() check in SfdiskBackend::scanDevice.
2018-07-15 12:06:54 -03:00
Caio Carvalho a0b9a93b6b Support inactive RAID devices. 2018-07-15 10:31:27 -03:00
Andrius Štikonas 5828e9daac Scan LVM devices after RAID.
This should allow us to find LVM PVs that are on RAID devices.
2018-07-15 13:03:07 +01:00
l10n daemon script 79a6f5a192 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-07-15 05:17:11 +02:00
Andrius Štikonas ce425ee04d Exit if the previous KAuth helper is still running. 2018-07-15 01:13:54 +01:00
Andrius Štikonas 9a8166fe65 Remove qDebug message.
It shouldn't be necessary now. Helper exits reliably.
2018-07-15 00:35:55 +01:00
Andrius Štikonas f572681684 Partially revert 252b108660.
That commit broke LVM support.
2018-07-15 00:28:38 +01:00
Andrius Štikonas 51780a6297 Stop KAuth helper if application crashes.
This is implemented by pinging application from KAuth helper via DBus.
If it is busy  then KAuth helper also waits for the current job to finish.
2018-07-15 00:09:39 +01:00
Andrius Štikonas 65ef6ab83d Fix error message.
It was incorrectly saying DBus session bus instead of system bus.
2018-07-14 21:36:13 +01:00
Andrius Štikonas 252b108660 Abort LVM scanning when lvdisplay command fails. 2018-07-14 13:19:15 +01:00
Caio Carvalho aa23ecdc3c Software RAID devices can be created containing '/' character after 'md'. (e.g. /dev/md/alpha0) 2018-07-13 19:33:08 -03:00
Caio Carvalho 6803d6bc67 Including RAID level in SoftwareRAID device pretty name. 2018-07-13 17:56:13 -03:00
Caio Carvalho b3e0dbe15a Adding full command option for detail and stop Software RAID. 2018-07-13 16:20:38 -03:00
Caio Carvalho d8602817f0 Adding reassemble method for SoftwareRAID. 2018-07-12 14:38:52 -03:00
Caio Carvalho 3f7c5ca722 Reassemble Software RAID when commit partition table. 2018-07-12 14:08:24 -03:00
Andrius Štikonas b11b73b1e5 Remove extra semicolon after Q_UNUSED. 2018-07-12 00:12:43 +01:00
Andrius Štikonas d51404c7f1 sfdisk: fix returned partition name
This makes it work with partitions such as /dev/mmcblk1p2
2018-07-11 23:36:20 +01:00
Caio Carvalho e2f88dbbf9 Including SoftwareRAID attributes getters. 2018-07-11 12:03:44 -03:00
Caio Carvalho a2d601d512 Checking for SoftwareRAID_Device type in partition table job. 2018-07-11 12:01:26 -03:00
Caio Carvalho ab7def5e7d Changing HardwareRAID_Device to FakeRAID_Device. 2018-07-11 11:57:56 -03:00
Caio Carvalho a8b7222350 Check for SoftwareRAID devices in CreateFileSystemJob. 2018-07-10 23:04:55 -03:00
Caio Carvalho ae8987b82c Sfdisk always creates RAID logical partitions with a 'p' character before partition number. 2018-07-10 23:03:21 -03:00
Caio Carvalho 6c27d99f2c Enabling to create and delete SoftwareRAID devices' partitions. 2018-07-10 20:03:59 -03:00
Caio Carvalho 04a5e2914d Correctly showing Software RAID device partition table. 2018-07-10 19:09:22 -03:00
Caio Carvalho c03c0ddc15 Including src/core/raid subdirectory. 2018-07-09 20:48:52 -03:00
Caio Carvalho 998b1292c0 SoftwareRAID initial implementation. 2018-07-09 20:01:34 -03:00
Andrius Štikonas 9e3386a53b Static cast should be sufficient here
In the line above we already check if partition type is luks
2018-07-08 11:02:34 +01:00
Andrius Štikonas 0dd5ac25fd Revert "Remove deprecated attribute for now."
This reverts commit 4bcf9288e6.
2018-06-16 19:35:09 +01:00
l10n daemon script 11954f1185 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-06-16 05:31:52 +02:00
Andrius Štikonas dc248c3011 Merge branch 'master' into kauth 2018-06-15 20:40:29 +01:00
Caio Carvalho 358957641b Including LVM VG device scan in scanDevice in SfdiskBackend and LibPartedBackend. It was scanning only for DiskDevices. 2018-06-11 18:33:11 -03:00
l10n daemon script 7497d509f4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-06-07 05:41:48 +02: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
Caio Carvalho 6b0af70ccd Avoiding segfault in DeleteOperation and ResizeOperation. 2018-05-07 22:56:24 -03:00
Caio Carvalho 1e95d01923 - Including vgName in CreateVolumeGroupOperation description.
- Don't delete LVM PVs that are being targeted by CreateVolumeGroupOperations.
- Don't shrink or move LVM PVs that are being targeted by CreateVolumeGroupOperations.
2018-05-07 21:55:49 -03:00
Caio Carvalho 34cfc63da4 Including CreateVolumeGroupOperation::targets(const Partition&) implementation. 2018-05-03 20:48:11 -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
l10n daemon script b3a8a3874f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-04-23 05:26:25 +02:00
Andrius Štikonas dcfb9f181f Use more C++11 initializer lists. 2018-04-23 00:09:46 +03:00
Andrius Štikonas ea664bfffc Set polkit action icon to partitionmanager. 2018-04-21 21:34:24 +03:00
Andrius Štikonas 0d29dc8a6b Fix class/struct mismatch in forward declaration. 2018-04-18 21:46:15 +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 5814c6c02a Allow setting KAuth parent widget. 2018-04-15 01:35:29 +03:00
Andrius Štikonas 4b1793f79b Update backend name in the docs. 2018-04-15 01:09:48 +03:00
Andrius Štikonas 145f54f18c Move KAuth helper setup code to ExternalCommand class.
Delay helper startup until it is actually required.
2018-04-14 23:55:05 +03:00
Andrius Štikonas ed59aac2c8 Show error when setting file system label fails. 2018-04-13 20:21:48 +03:00
Andrius Štikonas 07458efb91 Make sure system is informed about the change of file system label. 2018-04-13 15:54:51 +03:00
Andrius Štikonas a6100aaa37 Add an error message in case of invalid signature. 2018-04-13 14:26:44 +03:00
Andrius Štikonas 231bfbd331 Cryptographically sign copyblocks and exit KAuth helper calls. 2018-04-13 14:24:05 +03:00
Andrius Štikonas 6b558f49d8 Use blockdev --rereadpt instead of partx --update. 2018-04-13 13:08:43 +03:00
Andrius Štikonas 24e1e83152 Try to fix QString encoding issues in KAuth helper.
For now set text codec to UTF-8
Needs more investigation if locale of the GUI program is not UTF-8.
2018-04-13 02:44:12 +03:00
Andrius Štikonas 71b56d27a8 Keep Capacity::Unit a simple enum, otherwise KPM fails to compile. 2018-04-13 01:29:43 +03:00
Andrius Štikonas fc4133233b Revert "Try to workaround systemd automounting."
This reverts commit 9cc583e7d5.
2018-04-13 01:06:32 +03:00
Andrius Štikonas e0be8fae83 Initialize m_Counter variable on startup. 2018-04-13 00:51:08 +03:00
Andrius Štikonas 428ee5b6c8 First attempt at using RSA to sign requests to KAuth helper. 2018-04-13 00:43:12 +03:00
Andrius Štikonas 527734e9e8 Switch JobStatus enum to scoped enum. 2018-04-12 15:18:50 +03:00
Andrius Štikonas 4bcf9288e6 Remove deprecated attribute for now.
Not available on current Neon.
2018-04-12 15:16:49 +03:00
Andrius Štikonas 0263e45251 Merge branch 'master' into kauth 2018-04-12 13:48:06 +03:00
Andrius Štikonas 4773023f75 Add migration documentation for deprecated enum values. 2018-04-12 13:47:33 +03:00
Andrius Štikonas 221d7aded6 d-pointerize ExternalCommand class. 2018-04-12 00:47:40 +03:00
Andrius Štikonas 9e107c8136 Add forgotten files. 2018-04-11 15:14:17 +03:00
Andrius Štikonas db40442744 d-pointerize Operation class. 2018-04-11 03:52:46 +03:00
Andrius Štikonas 9cc583e7d5 Try to workaround systemd automounting. 2018-04-10 23:26:44 +03:00
Andrius Štikonas dda5ddd3e6 Fix more memory leaks in SmartDiskInformation. 2018-04-09 16:16:02 +01:00
Andrius Štikonas a9a637454a Fix a memory leak in SmartParser.
CC: caiojcarvalho@gmail.com
2018-04-09 16:07:44 +01:00
Andrius Štikonas 492e3beb18 Reuse SmartStatus::SelfTestStatus enum. 2018-04-09 15:37:46 +01:00
Andrius Štikonas b5d0b500cf Reuse SmartStatus::Overall enum for SmartDiskInformation. 2018-04-09 15:27:07 +01:00
Andrius Štikonas 622def3b56 Convert more enums to scoped enums. 2018-04-09 15:14:34 +01:00
Andrius Štikonas df449ac3d4 Mark old enum values as deprecated. 2018-04-09 13:42:36 +01:00
Andrius Štikonas ee2688d4d9 Merge branch 'master' into kauth 2018-04-09 12:44:14 +01:00
Andrius Štikonas f389306964 Make sure deprecated Partition::State enums have the same values as the new ones. 2018-04-09 12:32:46 +01:00
Andrius Štikonas b42b41bdea Add a shorter Partition::State enum names.
Will be converted to enum class later.
2018-04-09 03:46:05 +01:00
Andrius Štikonas 87f0d9d0a7 micro-optimization: QStringLiteral->QLatin1Char 2018-04-09 03:18:12 +01:00
Andrius Štikonas 844f7b3d59 LvmDevice: switch away from manual pointers. 2018-04-09 03:14:30 +01:00
Andrius Štikonas 3ccd04e675 Switch Device::Type enum to enum class. 2018-04-09 02:57:45 +01:00
Andrius Štikonas 1021e375b4 Create a new d-pointer when copying Device class.
Fixes a crash in Calamares
2018-04-09 02:45:24 +01:00
Andrius Štikonas 7e8bab3b4e d-pointerize LvmDevice class. 2018-04-09 02:40:24 +01:00
Andrius Štikonas df364bdc7c Reuse the d-pointer of the base class Device for the child class DiskDevice. 2018-04-09 00:35:06 +01:00
Andrius Štikonas 210dea15de Use smart pointer for SmartStatus.
Fixes a memory leak.
2018-04-08 14:58:02 +01:00
Andrius Štikonas a71be700ba d-pointerize Device class. 2018-04-08 14:45:59 +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
l10n daemon script 6eab8757b5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-04-06 05:23:24 +02:00
Andrius Štikonas 876c037ebf Use strongly typed enum for SmartAttributeUnit. 2018-04-05 23:06:52 +01:00
Andrius Štikonas 63cea60ff1 Replace std::array with std::vector
Less efficient but helps with keeping ABI stable
2018-04-05 21:52:17 +01:00
Andrius Štikonas 54be18e8ad Deprecate cyllinder and head count. 2018-04-02 14:12:35 +01:00
Andrius Štikonas cfa853a931 d-pointerize DiskDevice class. 2018-04-02 13:46:53 +01:00
Andrius Štikonas 0b6d91bbdb Do not install some private smart include files. 2018-04-02 13:13:16 +01:00
Andrius Štikonas 398e9c3df5 d-pointerize FstabEntry class 2018-04-01 18:46:26 +01:00
Andrius Štikonas 7ed6657e30 Restore functionality of FileSystem::findExternal
This also fixes unused variable warnings
2018-03-31 23:49:37 +01:00
Andrius Štikonas a83cb256cb Finish d-pointerizing CoreBackend class. 2018-03-31 22:08:55 +01:00
Andrius Štikonas 279159ca6f Use smart pointers for CoreBackendPartitionTable. 2018-03-31 21:49:20 +01:00
Andrius Štikonas 2527b3ecc3 Merge branch 'master' into kauth 2018-03-31 20:30:05 +01:00
Andrius Štikonas c1f4b36305 Fix mutex logic for cancelling operations. 2018-03-31 20:17:43 +01:00
Andrius Štikonas 5e85f0b974 Remove ping interface in KAuth helper as it is blocking KPM GUI. 2018-03-31 18:01:00 +01:00
Andrius Štikonas 738842799a Make kpmcore link libraries private. 2018-03-31 16:30:53 +01:00
Andrius Štikonas 1500eeb625 Use std::unique_ptr for CoreBackendDevices 2018-03-31 14:44:40 +01:00
Andrius Štikonas 8fa1814f45 Remove libparted backend. 2018-03-31 13:14:38 +01:00
Andrius Štikonas 00cb2c85d9 d-pointerize CoreBackendManager 2018-03-31 13:07:35 +01:00
Andrius Štikonas 8f88efeefd Use std::unique_ptr in CoreBackend. 2018-03-31 12:56:34 +01:00
l10n daemon script 8658743a49 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-30 05:19:57 +02:00
Andrius Štikonas 9218b55c57 Exit even loop if KAuth job finishes with error. 2018-03-28 02:15:46 +01:00
Andrius Štikonas e3aae714a2 Remove unnecessary whitespace. 2018-03-24 18:27:00 +00:00
Caio Carvalho f8f25dc82a - Changing SmartQuirkDatabase to store QString instead of char*.
- Changing quirkDatabase function to return QVector<SmartQuirkDatabase> instead of SmartQuirkDatabase*.
2018-03-24 15:17:30 -03:00
Andrius Štikonas a4be3fd2ea Start KAuth helper in CoreBackendManager constructor. 2018-03-24 15:32:15 +00:00
Andrius Štikonas f04416beba Simplify Qtimer code in ExternalCommandHelper. 2018-03-23 22:47:21 +00:00
Andrius Štikonas 8cdf70171e Start QTimer before enteting event loop. 2018-03-23 22:08:23 +00:00
Caio Carvalho 47a1519699 - Including Watchdog Timer in CoreBackendManager to ping DBus service.
- Including ExternalCommandHelper::ping slot to receive pings.
- Including timer to watch last ping in the service to unregister it after reaching 42 seconds without pings.
2018-03-23 18:19:33 -03:00
Andrius Štikonas ca136dfcaa Add some comments.
Move copyblocks function lower in a file.
2018-03-22 17:52:59 +00:00
Andrius Štikonas 2cef3f6ec6 Cleanup ExternalCommand interface:
* Remove a separate constructor for copyblocks.
 * Remove kauthThread and finished() signal.
2018-03-22 17:29:40 +00:00
Andrius Štikonas 39d3592c23 Actually check if the caller is authorized. 2018-03-22 17:41:49 +01:00
Caio Carvalho dac3372a78 - Including ExternalCommandHelper asynchronous DBus call in ExternalCommand::execute
- Stop helper before starting a new in CoreBackendManager::startExternalCommandHelper
- Unregister org.kde.kpmcore.helperinterface service in ExternalCommandHelper::exit
2018-03-22 02:32:59 -03:00
Andrius Štikonas 4b91f2c07e Convert copyblocks dbus call to asynchronous call. 2018-03-21 21:51:30 +01:00
Andrius Štikonas 97d7076481 Increase DBus call timeout to 10 days. 2018-03-21 21:11:09 +01:00
Andrius Štikonas c09f6fb9fa Add a function to stop KAuth helper daemon. 2018-03-21 20:44:07 +01:00
Andrius Štikonas bd54ba7c5d Convert copyblocks code from KAuth to DBus calls to helper daemon. 2018-03-21 18:01:40 +01:00
Andrius Štikonas ef2b61d2ec Wait until the helper started.
Ideally we should not block at this stage and wait before the first command
is executed. But this is much better than nothing.
2018-03-19 16:21:57 +01:00
Andrius Štikonas 645e16bb20 WIP: add some experimental code where helper is used as daemon
Caveats:
 * copyblocks are not converted yet, but should be similar.
 * There is no signaling back to main application which tells when even loop has started, so after password is entered, you need to click F5 to rescan devices
 * There are some security checks but are they sufficient
2018-03-19 11:42:49 +01:00
l10n daemon script ad863cc6b1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-19 05:09:05 +01:00
Andrius Štikonas 519cc2cd3c Merge branch 'master' into kauth 2018-03-18 12:52:57 +01:00
l10n daemon script 2f621fc6db SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-13 05:16:54 +01:00
l10n daemon script 4406297053 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-12 04:59:29 +01:00
l10n daemon script f89bc39c76 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-11 05:21:27 +01:00
l10n daemon script 11d2bbc344 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-06 05:21:11 +01:00
l10n daemon script 07a0f47c57 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-05 05:14:10 +01:00
l10n daemon script 67b25dc0e9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-04 05:17:01 +01:00
Andrius Štikonas 17451c3494 Add non-const overload to partition() function. 2018-03-03 16:38:21 +00:00
l10n daemon script fe117a20b0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-03 05:26:15 +01:00
Andrius Štikonas 144e260efe Finish porting to KCoreAddons JSON plugins.
Convert .desktop files to .json with desktoptojson
2018-03-02 11:33:46 +00:00
l10n daemon script ff9e6c8323 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-02-19 04:59:32 +01:00
Huzaifa Faruqui 72da110996 Fix copyblocks exit status check 2018-02-06 22:32:26 +05:30
Andrius Štikonas ac6dc0eb87 Remove backend readData/writeData functions. 2018-02-06 16:48:02 +00:00
Andrius Štikonas 06139c85ac Remove unused function argument in startCopyBlocks. 2018-02-06 16:24:32 +00:00
Huzaifa Faruqui 00d47c6417 Use QFile for ExternalCommandHelper::readData. 2018-02-05 12:58:37 +00:00
Andrius Štikonas b79f713ed8 Fix ExternalCommandHelper::writeData function.
QFile::open needs QIODevice::Append flag.
2018-02-05 12:46:13 +00:00
Andrius Štikonas af6c345210 Use CMAKE_SYSTEM_NAME to check whether we are running on Linux. 2018-02-04 19:17:34 +00:00
Andrius Štikonas aa23fc1168 cmake does not define LINUX variable. 2018-02-04 19:11:25 +00:00
Andrius Štikonas 11e435657a Do not build libparted backend. 2018-02-04 16:14:59 +00:00
Andrius Štikonas 2641730c0c Merge branch 'master' into kauth 2018-02-04 15:56:38 +00:00
Andrius Štikonas dcc9875923 Fix regular expression used in readLabel and readUUID. 2018-02-04 15:56:30 +00:00
Andrius Štikonas 469855f7f7 Add missing variables to Partition class copy constructor. 2018-02-04 15:21:58 +00:00
Andrius Štikonas b35c21ed71 Fix an out of order compile warning.
Initialization should happen in the same order as variables are declared.
CC: huzaifafaruqui@gmail.com
2018-02-04 13:44:55 +00:00
Andrius Štikonas 4cae6f0632 Merge branch 'master' into kauth 2018-02-04 13:44:29 +00:00
Andrius Štikonas 8aac14ceca Actually run udev command when reading label/uuid. 2018-02-04 13:40:32 +00:00
Andrius Štikonas f426f59799 Use QFile for writing data in ExternalCommandHelper::writeData
dd works much slower when writing to files, especially files on SSD.
Thanks to Huzaifa Faruqui for suggestion.
2018-02-03 15:58:36 +00:00
Andrius Štikonas 5c307c1cc7 Use toLongLong in KAuth helper.
Otherwise all integers simply overflow.
2018-02-02 18:33:35 +00:00
Andrius Štikonas 4870587339 Set sfdisk backend as default. 2018-01-31 18:50:49 +00:00
Andrius Štikonas 7e60df68bd Do not expose libparted backend on non Linux systems. 2018-01-31 17:08:05 +00:00
Andrius Štikonas f2b7f2bd9b Use const char* instead of QString in Fstab::findBlkIdDevice
Thansk to: Adriaan de Groot
2018-01-31 17:02:59 +00:00
Andrius Štikonas f98dbcc208 Only use libblkid on Linux. 2018-01-31 16:58:00 +00:00
Andrius Štikonas 838150d439 Do not use blkid cache. 2018-01-31 16:53:34 +00:00
Andrius Štikonas c50006ed22 Fix #include issues in smart code.
CC: caiojcarvalho@gmail.com
2018-01-31 16:12:11 +00:00
Andrius Štikonas 56de5e1e06 Merge branch 'master' into kauth 2018-01-31 16:03:58 +00:00
Andrius Štikonas 67f79f42dd Add cmake option for sfdisk backend. 2018-01-31 16:03:51 +00:00
Andrius Štikonas 9ea7cab92a Merge branch 'master' into kauth 2018-01-31 15:15:25 +00:00
Andrius Štikonas ba4e443223 Move file system label and UUID read code to backends.
This allows to use different implementations on different platforms.
E.g. libblkid is not available on FreeBSD.

libparted backend still uses the same libblkid implementation
sfdisk backend reads label and UUID from udev database
2018-01-31 15:13:34 +00:00
Andrius Štikonas 7e8f64ffd7 Fix a possibly uninitialized variable. 2018-01-31 14:58:43 +00:00
Andrius Štikonas 2534608094 Use btrfs check --repair instead of btrfsck. 2018-01-29 13:30:14 +00:00
Andrius Štikonas 3a6aa4aaa0 Do not link to libatasmart. 2018-01-29 12:49:25 +00:00
Huzaifa Faruqui b143c139e5 Fix Report in copyBlocks 2018-01-29 16:45:21 +05:30
Andrius Štikonas dd709fc8a9 Remove unnecessary extra LIBKPMCORE_EXPORT macros. 2018-01-27 13:15:19 +00:00
Andrius Štikonas bf2a23dada Use copyjobs KAuth helper for other copying jobs too. 2018-01-24 15:45:19 +00:00
Andrius Štikonas 61fed73a5d Remove some debug output. 2018-01-24 15:35:11 +00:00
Huzaifa Faruqui e42a5c9289 Implement copyblocks function in KAuth helper.
Switch BackupFileSystemJob to thenew copyblocks function.

Reviewed and cleaned up by: Andrius Štikonas
2018-01-24 15:22:42 +00:00
Andrius Štikonas 4eff7d7594 Do not export CoreBackendDevice and CoreBackendPartitionTable classes. 2018-01-21 13:53:07 +00:00
Caio Carvalho a3d43e159f Removing LIBKPMCORE_EXPORT from SmartParser and adding SMART support dependencies to testsmart in cmake 2018-01-21 01:41:59 -03:00
Caio Carvalho 49c0c39f4b - Including SMART support test
- Adding export macro to SmartParser
2018-01-20 21:56:10 -03:00
l10n daemon script 098b9bc2ae SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-01-14 04:49:26 +01:00
l10n daemon script 85085d8eb7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-01-13 04:47:56 +01:00
Andrius Štikonas d2ee0010d0 Update credits. 2018-01-12 11:32:09 +01:00
Andrius Štikonas 1c024c6b29 Fix a typo in the comment. 2018-01-11 21:59:18 +01:00
Caio Carvalho 0190d32cf6 Including doxygen comments to the new SMART support classes 2018-01-11 17:38:53 -03:00
Andrius Štikonas a135c86ba1 Use QStringLiteral instead of QString::fromLocal8Bit 2018-01-11 14:17:55 +01:00
Andrius Štikonas ed7c5b1c77 Use long command line option for smartctl. 2018-01-11 12:00:52 +01:00
Andrius Štikonas 4069e5112e Post merge fixes.
In kauth branch ExternalCommand::write should be called before start.
2018-01-11 11:45:39 +01:00
Andrius Štikonas 790553aa0b Merge branch 'smart' into kauth 2018-01-11 11:31:18 +01:00
Caio Carvalho 44fae61d4f - Removing libatasmart dependency from CMakeLists.txt
- Changing getQuirk regular expression evaluation to use QRegularExpression instead of QRegExp
2018-01-09 19:34:20 -03:00
Caio Carvalho d71731141c - Changed m_Quirk variable in SmartAttributeParsedData to SmartQuirk value instead of reference
- Changed smartctl call to use ExternalCommand class instead of QProcess
- Changed Q_FOREACH to C++11 ranged based for
- Changed quint64 json parsing
2018-01-09 01:35:59 -03:00
Caio Carvalho 8177fb9738 Adding smart JSON output support 2018-01-08 17:59:48 -03:00
l10n daemon script 5376808159 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-01-07 04:56:23 +01:00
l10n daemon script ba3676e165 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-01-04 04:49:48 +01:00
Pali Rohár 2f4aeaf851 Add support for reading capacity and changing label/uuid on UDF filesystem 2018-01-03 20:09:53 +02:00
Andrius Štikonas 8b9451c8d7 We don't need keyLocation for luks1 file system it is always dm-crypt. 2017-12-29 22:53:02 +00:00
Andrius Štikonas 1802b7ad05 Add luks2::create method. 2017-12-29 20:38:36 +00:00
Andrius Štikonas 4773f49edc Initial support for resizing LUKS2 volumes.
Does not yet work when LUKS2 is used with dm-integrity.
2017-12-29 20:01:06 +00:00
Andrius Štikonas 78a9ede36c Do not install internal backend headers. 2017-12-27 16:16:11 +00:00
Andrius Štikonas a6a69b1e31 Merge branch 'sfdisk' into kauth 2017-12-25 00:13:18 +00:00
Andrius Štikonas 590b531863 Commit partition table when closing Sfdisk backend device. 2017-12-25 00:11:13 +00:00
Andrius Štikonas 41570fde5d Set FAT12 MBR/GPT partition type. 2017-12-24 23:56:03 +00:00
Andrius Štikonas f20bea9bf8 Merge branch 'sfdisk' into kauth 2017-12-24 23:40:06 +00:00
Andrius Štikonas 97ccd8d154 Merge branch 'master' into sfdisk 2017-12-24 23:38:39 +00:00
Andrius Štikonas 5123411f1f Add support for FAT12 file system. 2017-12-24 23:24:37 +00:00
Andrius Štikonas 8de54d390e Make default LUKS2 colour different from LUKS. 2017-12-24 20:38:46 +00:00
Andrius Štikonas 3e7e9d8955 Sort partitions by first sector. 2017-12-21 23:16:12 +00:00
Andrius Štikonas f9cd824075 Add a comment about boot flags. 2017-12-20 15:03:48 +00:00
Andrius Štikonas f8cbd28238 Remove FIXME that was already fixed. 2017-12-16 12:55:34 +00:00
Andrius Štikonas 76934a0cba Add forgotten luks2 files. 2017-12-15 19:35:30 +00:00
Andrius Štikonas 3a691edb4a Do not install copy source/target device headers. 2017-12-15 19:33:11 +00:00
Andrius Štikonas 7aa77f489d Add FileSystem::Luks2 child class. 2017-12-14 02:08:32 +00:00
Andrius Štikonas 8c030baf3e Switch file system detection code to udevadm. 2017-12-14 01:14:45 +00:00
Andrius Štikonas 3f562ab0f0 Allow reading LUKS label. 2017-12-13 00:07:55 +00:00
Andrius Štikonas fdf6e19de0 Remove another workaround which hopefully is no longer necessary. 2017-12-10 19:56:04 +00:00
Andrius Štikonas 8264c87ab8 Cleanup unnecessary includes. 2017-12-10 18:44:54 +00:00
Andrius Štikonas 27462bcddb Remove workaround to access user dbus session as root. 2017-12-10 18:09:03 +00:00
Andrius Štikonas 4cc07d2366 Adapt ntfs updateBootSector changes to kauth branch. 2017-12-10 17:37:10 +00:00
Andrius Štikonas 192305c1d5 Close write channel after writing to QProcess. 2017-12-10 17:36:39 +00:00
Andrius Štikonas 906a89c16d Use ExternalCommand to copy fstab file to its final location. 2017-12-10 17:36:39 +00:00
Andrius Štikonas d2f13ff4cc QFile->QTemporaryFile. 2017-12-10 17:36:39 +00:00
Andrius Štikonas 47429dd1bf Proof of concept attempt to implement KAuth. 2017-12-10 17:36:39 +00:00
Andrius Štikonas e7b0192630 Merge branch 'master' into sfdisk 2017-12-10 17:35:35 +00:00
Andrius Štikonas e49a266922 ntfs: update backup boot sector too
When moving NTFS partition to a new location we need to update its boot sector
as well as backup boot sector. Otherwise ntfslabel --new-serial won't work.
2017-12-10 17:34:07 +00:00
Andrius Štikonas def62c975d Replace ntfs with ntfs-3g in lsblk file system detection code. 2017-12-09 23:31:31 +00:00
Andrius Štikonas c3827b0c60 Call kpartx to reread partition table. 2017-12-09 23:29:18 +00:00
Andrius Štikonas e3d01cf25f Do not attempt to set empty partition type. 2017-12-09 19:19:36 +00:00
Andrius Štikonas 4c2efe8c52 Add partition type map. 2017-12-07 23:24:03 +00:00
Andrius Štikonas 55b8cd3e6b sfdisk: store a pointer to the device in SfdiskPartitionTable class. 2017-12-07 20:50:54 +00:00
Andrius Štikonas 41473119b1 backend: provide more information about backend device.
Pass Device object, not just deviceNode string when opening Core Backend Device
2017-12-06 21:33:31 +00:00
Andrius Štikonas 0bfb7094df Merge branch 'master' into sfdisk 2017-12-06 00:41:19 +00:00
Andrius Štikonas e66fb4b95e Do not attempt to set partition flags that were not changed. 2017-12-06 00:27:02 +00:00
Andrius Štikonas d27455b6f0 Avoid unnecessary QString encoding/decoding.
CCBUG: 384321
2017-12-04 21:19:11 +00:00
Andrius Štikonas 8afe33a4a4 Allow setting label for inner LUKS file system during the initial creation. 2017-12-03 16:28:16 +00:00
Andrius Štikonas f09cb6435e Fix conversion to/from QByteArray in sfdisk backend.
CCBUG: 384321
2017-12-03 12:40:57 +00:00
Andrius Štikonas 6996687123 Merge branch 'master' into sfdisk 2017-12-03 12:38:43 +00:00
Andrius Štikonas 4bf5bb467f Fix conversion to/from QString/QByteArray
BUG: 384321
2017-12-03 12:37:21 +00:00
Andrius Štikonas f1a695bdac Add support for growing f2fs file system. 2017-11-13 19:34:52 +00:00
Andrius Štikonas be7ba11f17 Remove unnecessary semicolons. 2017-11-12 14:55:55 +00:00
Andrius Štikonas fad8a3568e Fix the previous commit.
FileSystem::create is never called if createWithLabel is available.
2017-11-12 14:45:49 +00:00
Andrius Štikonas 58f2decdf8 Support newer f2fs-tools versions.
BUG: 386771
2017-11-12 13:07:48 +00:00
Andrius Štikonas fcfd78cdc4 Add support for fatresize program. 2017-11-09 23:14:52 +00:00
Andrius Štikonas d3cde41df0 Allow setting boot, esp and bios-grub flags in sfdisk backend. 2017-11-08 00:01:24 +00:00
Andrius Štikonas 80de99fc73 Move setFlags function from CoreBackendPartition to CoreBackendPartitionTable.
setFlags function now takes additional argument const Partition& partition.
This allows us to completely remove CoreBackendPartition class.
Remove getPartitionBySector and getExtendedPartitions.
These functions were designed around libparted API and are not very convenient
with other backends.
2017-11-07 22:55:28 +00:00
Andrius Štikonas 0d88e26c8c Add an experimental sfdisk backend. 2017-11-07 22:51:29 +00:00
Andrius Štikonas a6415561ae SetPartFlagsJob should return error when it is unable to find partition. 2017-11-07 03:07:51 +00:00
Andrius Štikonas 89a5308686 btrfs: implement updateUUID. 2017-11-05 20:42:40 +00:00
Andrius Štikonas 9ea983654c Do not export symbols of CopySource(Target)Device
Calamares resize jobs was ported to ResizeOperation, so this is no longer
necessary.
2017-11-01 20:11:38 +00:00
Andrius Štikonas 87e210432d Merge branch '3.2' 2017-10-31 16:16:36 +00:00
Andrius Štikonas 8909dd87d0 Add a workaround for device not ready error.
In rare cases after moving file system to a new location file system check
fails on the first try. As a temporary workaround, wait a bit and try again.
2017-10-30 15:59:05 +00:00
Andrius Štikonas 55e445b069 More user friendly copying direction message in the log. 2017-10-30 14:24:55 +00:00
Andrius Štikonas 72dfbe480a Replace readSectors/writeSectors backend functions.
New alternatives use QByteArray to store data and use bytes, not sectors.
2017-10-28 18:07:44 +01:00
Andrius Štikonas e4c125c519 Do not over encapsulate Partition methods.
This caused more trouble than helped. There is no reason not to allow
e.g. settings new flags on partition or changing it's path.
2017-10-09 21:13:58 +01:00
Andrius Štikonas d741fe4a00 Fix a typo in a comment. 2017-10-09 17:37:16 +01:00
Andrius Štikonas 9f3b2b8fd4 Use qOverload in Qt signal/slots. 2017-10-09 13:39:34 +01:00
Andrius Štikonas 2760f02fbf Move LVM device scanning code.
Now it's the backend's responsibility to find LVM devices.
All LVM scanning code was moved into LvmDevice::scanSystemLVM helper,
so that it is very easy to plug LVM into backend.

LVM devices are now intentionally not detected in Dummy Backend.
2017-10-06 03:17:51 +01:00
Andrius Štikonas 15eabf9859 Add some comments about LVM in DeviceScanner. 2017-10-03 21:02:40 +01:00
Adriaan de Groot c4ae5d680c Docs: document Device (a description) and CoreBackendDevice (an operational class) 2017-10-03 05:56:16 -04:00
Adriaan de Groot 98caf84424 Docs: change parameter name to match intention.
Document that  means exclude-read-only and change the
name to match. It was already named excludeReadOnly in the
parted backend.
2017-10-03 05:56:16 -04:00
Andrius Štikonas 80c5cb5a1f Remove no longer used include. 2017-10-03 02:32:36 +01:00
Andrius Štikonas 40e22c94f2 Store ExternalCommand output in QByteArray.
This makes it possible to run dd with ExternalCommand.
2017-10-03 02:27:47 +01:00
Andrius Štikonas 37d3639bfe Update credits. 2017-10-02 22:44:58 +01:00
Adriaan de Groot e67b6b6a2b Docs: Add documentation about FileSystem::name() 2017-10-02 16:16:49 +02:00
Andrius Štikonas 8fd723770a Update credits. 2017-10-02 01:40:41 +01:00
Andrius Štikonas 722ef62ebb Port away from KService. 2017-10-01 22:05:50 +01:00
Andrius Štikonas 8c3ab58d84 Add a comment about FAT volume ID hack. 2017-09-28 14:24:13 +01:00
Pali Rohár e957c220bd Disallow non-ASCII and ASCII control characters in FAT label
FAT label is interpreted according to current OEM DOS codepage which is
system dependent setting. But most DOS codepages have same characters in
printable ASCII range, so this is the only safe range of characters which
are interpreted in same way by most programs and operating systems. Also
all DOS codepages are only 8bit, so characters above U+FF cannot be stored
to FAT label.
2017-09-26 22:02:02 +01:00
Pali Rohár 5a30aff288 Set FAT label in upper case
FAT label should be stored in upper case. Also Windows systems doing it.
2017-09-26 22:01:56 +01:00
Andrius Štikonas 098fdee506 fstab fixes:
* Do not output # for empty inline comments.
  * More checks to validate fstab entry.
2017-09-20 21:22:53 +01:00
Andrius Štikonas a3732c1459 Fix a typo. Remove extra trimmed(). 2017-09-17 13:52:48 +01:00
Andrius Štikonas 1713f66872 Fix reading partition label. 2017-09-17 13:06:31 +01:00
Andrius Štikonas d99b3f6eb3 Improve QFileInfo usage.
Cache QFileInfo result in a local variable.
Before repeated request often incorrectly resulted in QString()
2017-09-17 00:39:53 +01:00
Andrius Štikonas 4a64465738 Remove MountEntry class. 2017-09-16 20:56:32 +01:00
Andrius Štikonas 8dd1e70b21 Fix inline comment handling.
CCBUG: 305469
2017-09-16 20:50:57 +01:00
Andrius Štikonas baec157314 Add a function to write fstab file.
CCBUG: 305469
2017-09-16 20:40:46 +01:00
Andrius Štikonas 8719fb0bf3 Add fstab mutators. 2017-09-16 20:16:17 +01:00
Andrius Štikonas 4257021857 Use QStringList to store fstab options. 2017-09-16 19:09:03 +01:00
Andrius Štikonas 687e3fc7d4 Do not store more than 10M characters in ExternalCommand output.
BUG: 368674
2017-09-15 14:59:59 +01:00
Andrius Štikonas ec89795326 Allow accessing untranslated partition roles. 2017-09-15 13:09:01 +01:00
Andrius Štikonas dff6086e64 Copy paste typo. 2017-09-15 12:59:10 +01:00
Andrius Štikonas 0d16e945c1 Add a partition role name for LVM logical volume. 2017-09-15 12:50:05 +01:00
Andrius Štikonas f1888f0d1c Change a way untranslated file system name is accessed. 2017-09-15 12:47:01 +01:00
Andrius Štikonas 0c33a7b001 Move showColumnsContextMenu function from kpmcore to partitionmanager. 2017-09-14 20:43:08 +01:00
Andrius Štikonas 95a74c63d1 Do not report wrong mountpoint for closed LUKS file systems.
When libparted scans luks partitions it calls detectFileSystem
regardless of whether luks is open or closed. This results in
mapperNode being empty, so we need to prevent detectFileSystem
from reporting anything in this case.
2017-09-14 17:50:21 +01:00
Andrius Štikonas f29534e7c7 Use untranslated file system name when exporting partition table.
CCBUG: 364648
2017-09-14 14:47:00 +01:00
Andrius Štikonas 5d65d83990 Add functions to access untranslated name of file system.
CCBUG: 364648
2017-09-14 14:23:07 +01:00
Andrius Štikonas 50ba46a693 Fix a typo where declarared variable was not used. 2017-09-14 01:27:38 +01:00
Andrius Štikonas 6b4185cff1 Do not crash when partition has no mount points. 2017-09-13 23:28:37 +01:00
Andrius Štikonas 268a68a318 Split fstab lines with both spaces and tabs. 2017-09-13 23:05:32 +01:00
Andrius Štikonas 8f7e0beb0f Sort files in CMakeLists.txt alphabetically. 2017-09-13 18:52:43 +01:00
Andrius Štikonas 34712dd2ed Add fstab file parser.
Remove dependency on KMountPoint and hence KIO.
2017-09-13 18:46:33 +01:00
Andrius Štikonas 6b6ddbdcef Use int for maxLabelLength. 2017-09-11 16:52:20 +01:00
Andrius Štikonas 17e6c32633 Fix more implicit type conversion warnings. 2017-09-11 13:41:03 +01:00
Andrius Štikonas 6c433c264c Port FileSystem::luks away from KDiskFreeSpaceInfo. 2017-09-11 12:19:49 +01:00
Andrius Štikonas a041090168 Port LvmDevice away from KDiskFreeSpaceInfo. 2017-09-11 12:15:37 +01:00
Andrius Štikonas 8a477e689e Minor clang warnings++ 2017-09-11 12:01:39 +01:00
Andrius Štikonas 5433294a5b Fix more minor clang issues. 2017-09-11 00:29:30 +01:00
Andrius Štikonas f7e5f7c7bf Rename KPMcore include guards.
clang in -Weverything mode does not like double underscore.
2017-09-10 20:12:52 +01:00
Andrius Štikonas 0f2ab468eb Disable some characters in FAT label input. 2017-09-10 19:19:08 +01:00
Andrius Štikonas fbf7e78efe Update credits: Pali Rohár 2017-09-10 18:03:41 +01:00
Andrius Štikonas f1654486dc Remove unnecessary semicolon. 2017-09-10 17:26:12 +01:00
Andrius Štikonas 2404689dd0 Port away from KDiskFreeSpaceInfo to QStorageInfo. 2017-09-08 18:35:30 +01:00
Andrius Štikonas 1889b9e8fa Port unmount code away from KMountPoints (KIO). 2017-09-08 17:58:27 +01:00
Andrius Štikonas f1accd1e0d Remove IconThemes dependency from kpmcore. 2017-09-08 15:05:55 +01:00