Andrius Štikonas
19f78ef76a
Port away from qAsConst.
2020-10-24 22:01:45 +01:00
Andrius Štikonas
924830ebbd
When falling back to blkid for filesystem type detection, distinguish between FAT16/32.
...
CCBUG: 418253
2020-10-04 18:34:00 +01:00
Andrius Štikonas
034311a7cc
Add support for whole disk file systems.
...
BUG: 400652
2020-10-03 15:14:51 +01:00
Andrius Štikonas
779cc6cfb7
Split scanPartition function from scanDevicePartitions.
2020-10-03 13:25:05 +01:00
Andrius Štikonas
26b352180b
Reword a comment.
2020-10-03 12:38:40 +01:00
Andrius Štikonas
30bd4d62a9
Add blkid fallback for file system detection if udev method fails.
2020-10-02 23:12:33 +01:00
Andrius Štikonas
ae05c031b7
Further splitting of detectFileSystem function.
2020-10-02 23:00:40 +01:00
Andrius Štikonas
ba05f99720
Split detectFileSystem function in sfdiskbackend into two smaller functions.
2020-10-02 22:37:51 +01:00
Andrius Štikonas
b97fd0eeaa
rename jsonCommand variable to sfdiskJsonCommand.
2020-10-02 17:35:23 +01:00
Andrius Štikonas
d68ffeadef
REUSE: SPDX style license headers for src/util.
2020-10-01 00:33:19 +01:00
Andrius Štikonas
be4d032f8b
REUSE: SPDX style license headers for src/plugins.
2020-09-30 23:58:54 +01:00
Adriaan de Groot
45bd205e79
Typofix: the function was half-renamed before the merge
2020-09-01 13:44:22 +02:00
Andrius Štikonas
997e8df183
Add a note about json fixes in util-linux 2.37
2020-08-28 22:41:43 +01:00
Adriaan de Groot
6aa9d93728
Workaround bad JSON output from sfdisk.
...
The output of `sfdisk --json /dev/sdb` is not necessarily
valid JSON. Then, no partition information is stored,
no first-valid-lba in particular. This leads to new partitions
being made from sector 0, which is invalid on a GPT table.
The workaround is to manually fix the known-broken JSON
from sfdisk. This is amply documented in a standalone
static function.
FIXES #425097
2020-08-24 22:53:54 +02:00
Andrius Štikonas
dc604c4d31
sfdisk: simplify scanDevice by moving out partition setup logic.
2020-06-19 01:52:16 +01:00
Gaël PORTAY
6f4b883130
sfdisk: Move GPT Attributes functions to new sfdiskgptattributes
...
This centralizes the two get functions related to GPT Attributes.
2020-06-16 20:15:56 -04:00
Gaël PORTAY
547fa609fe
sfdisk: Read GPT type and attributes at scanning
...
The GPT type and attributes can be set since the commits 0529ebf
(Add
support for setting the specific GPT type) and 0ffec31
(Add new job to
set the GPT partition attributes).
But these two data from existing partitions are not read and are missing
though.
This reads the GPT type and attributes data at scanning from the json
output, after the GPT name/label and uuid are read.
2020-06-16 15:45:53 -04:00
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
Shubham Jangra
67795a08ab
Fix uninitialized variable warning
2019-06-07 09:39:29 +05:30
Caio Carvalho
43da873c36
Fixing device scanning process
2019-04-03 15:37:47 -06:00
Andrius Štikonas
28e1308ec5
Switch to scoped name PartitionTable::Flag::
...
Deprecated old style enum PartitionTable::FlagName.
This will allow to switch to scoped enum class in some future version.
2019-02-09 18:04:44 +00:00
Andrius Štikonas
3df5acb9e3
Add scanDevices function that uses flags instead of bools.
...
Add and option to scan for loopback devices.
2019-02-09 15:40:06 +00:00
Andrius Štikonas
5a163f8bee
Detect MBR Extended LBA partitions.
2019-01-24 18:45:55 +00:00
Andrius Štikonas
559c326be7
Add detection support for Apple File System (APFS).
2019-01-13 17:34:05 +00:00
Andrius Štikonas
708318a5ad
Add BitLocker detection support.
...
CCBUG: 392892
2019-01-13 02:24:18 +00:00
Andrius Štikonas
9fa20fb1e2
Remove "mv" command from allowed external command list
2019-01-12 23:18:01 +00:00
Andrius Štikonas
055b1fe3e5
Make device model names prettier.
2019-01-12 00:24:26 +00:00
Andrius Štikonas
e5a20926cd
Fix device names spanning two lines.
2019-01-11 23:28:40 +00:00
Andrius Štikonas
d4f3ac62ae
Use drive-removable-media-usb icon for USB devices.
2018-12-06 01:23:27 +00:00
Caio Carvalho
0e4fca8de6
Getting lsblk kname in the cases where the model name isn't available
...
Summary:
lsblk command does not return model name as output in some specific cases, specially when you have a micro SD in your computer (perhaps it should happen with a normal SD card as well, but I haven't tested it).
So I included a verification in SfdiskBackend::scanDevice to check for kname in lsblk and use it as the name in these cases.
Reviewers: stikonas
Reviewed By: stikonas
Tags: #kde_partition_manager
Differential Revision: https://phabricator.kde.org/D16577
2018-11-24 21:46:34 -03:00
Andrius Štikonas
2007f2b8ea
Allow copyblocks to be used together with small QByteArrays.
...
Add CopyTargetByteArray. CopySourceByteArray is not implemented yet.
This is only suitable for reading small amount of data such as GPT header
or FAT boot sector location. Not meant for copying whole partition because
data has to be transfered over DBus.
Differential Revision: https://phabricator.kde.org/D16487
2018-10-29 00:02:12 +00:00
Andrius Štikonas
4080eef0ba
Set FlagBoot = FlagEsp and deprecate it.
2018-09-01 21:27:05 +01:00
Andrius Štikonas
046f17fa68
sfdisk: Make FlagEsp alias for FlagBoot
2018-09-01 18:40:10 +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
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
75bfd09c9c
Fix detection of NTFS partitions
...
BUG: 396749
2018-07-22 12:42:10 +01:00
Andrius Štikonas
c50e04c9d1
Use cryptographic nonce instead of counters.
2018-07-20 21:12:13 +01: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
f3fac7eac7
Add SoftwareRAID::Status enum.
...
Check for RAID before modelCommand in SfdiskBackend::scanDevice.
2018-07-15 13:11:50 -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
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
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
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
Andrius Štikonas
622def3b56
Convert more enums to scoped enums.
2018-04-09 15:14:34 +01:00
Andrius Štikonas
17c8772240
Explicitely specify the scope of enum.
2018-04-07 19:54:30 +01:00
Andrius Štikonas
1500eeb625
Use std::unique_ptr for CoreBackendDevices
2018-03-31 14:44:40 +01:00
Andrius Štikonas
dcc9875923
Fix regular expression used in readLabel and readUUID.
2018-02-04 15:56:30 +00:00