Commit Graph

627 Commits

Author SHA1 Message Date
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
Andrius Štikonas 5a83e741cb Add support for detecting ISO9660 file systems.
BUG: 364476
2017-09-08 11:42:12 +01:00
Andrius Štikonas 2cfcefd9c9 nilfs2: pass -f to mkfs.nilfs2 to overwrite existing file system 2017-09-08 00:20:35 +01:00
Andrius Štikonas 3866bf6fef Only include <linux/fs.h> on GNU/Linux 2017-09-07 21:34:45 +01:00
Andrius Štikonas 2b52ec492b Only create QRegularExpressionValidator when needed and destroy it afterwards. 2017-09-05 16:20:50 +01:00
Pali Rohár 9cc6596cb4 Implement udf::labelValidator() for validating UDF label
This would rapidly simplify UDF code if all checks are done by caller.

Also checks for MIN_UDF_BLOCKS/MAX_UDF_BLOCKS are removed as they should be
covered by udf::minCapacity() and udf::maxCapacity().
2017-09-05 15:53:24 +01:00
Andrius Štikonas 58f3d09d71 Port away from QRegExp. 2017-09-05 12:57:45 +01:00
Andrius Štikonas 447ae7fc90 Use QValidator to validate label input. 2017-09-05 12:52:34 +01:00
Andrius Štikonas 0badfebcb1 lvm: disable error channel for vgs/pvs commands.
Having an error channel can result in unwanted devices, e.g.:
"/dev//dev/mapper/test: read failed after 0 of 4096 at 0: Input/output error"
2017-09-04 19:55:08 +01:00
Andrius Štikonas 4a39e453dc Add a function for validating labels. 2017-09-04 17:39:29 +01:00
Andrius Štikonas 6ad873223e udf: set MBR partition id to 0x07. 2017-09-03 21:24:15 +01:00
Andrius Štikonas 703270b64c udf: do not hardcode min/max sector size. 2017-09-03 18:40:19 +01:00
Andrius Štikonas c4628ad715 Use block size provided by the backend in UDF file system. 2017-09-03 18:27:57 +01:00
Andrius Štikonas 7dba4b8245 Record sector size in FileSystem class. 2017-09-03 15:37:14 +01:00
Andrius Štikonas d797a47229 QList->QVector. 2017-08-31 10:48:10 +01:00
Andrius Štikonas 756c5b5beb Use QHash instead of QMap for storing LVM LV sizes. 2017-08-31 10:16:16 +01:00
Pali Rohár db13a4bab9 Process UDF label correctly when creating new UDF file system
Mkudffs from udftools prior to version 1.1 damages the label if it contains
non-ASCII characters.

The Volume Identifier (--vid) can only contain 30 bytes, either 30
ISO-8859-1 (Latin 1) characters or 15 UCS-2BE characters. Store the most
characters possible in the Volume Identifier.
2017-08-31 10:13:32 +01:00
Andrius Štikonas 2a118753ae Allow selecting different channels in ExternalCommand output. 2017-08-31 10:13:24 +01:00