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
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
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
f29534e7c7
Use untranslated file system name when exporting partition table.
...
CCBUG: 364648
2017-09-14 14:47:00 +01:00
Andrius Štikonas
50ba46a693
Fix a typo where declarared variable was not used.
2017-09-14 01:27:38 +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
17e6c32633
Fix more implicit type conversion warnings.
2017-09-11 13:41:03 +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
1889b9e8fa
Port unmount code away from KMountPoints (KIO).
2017-09-08 17:58:27 +01:00
Andrius Štikonas
3866bf6fef
Only include <linux/fs.h> on GNU/Linux
2017-09-07 21:34:45 +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
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
Andrius Štikonas
13c063a150
Fix a possible null pointer dereference.
...
On some systems getlogin() function might fail to obtain user name.
For now just check whether pointer is nullptr. In that case suspending
plasma device automounter would not work but at least we will not crash.
In future it might make sense to try to use other methods of obtaining login
name, such as running "who am i".
BUG: 381987
2017-07-04 21:07:54 +01:00
Andrius Štikonas
6b31dd0e85
Remove accidentally commited debug code.
2017-06-14 15:26:02 +02:00
Andrius Štikonas
b98dcc90d8
Bump version to 3.1.1.
2017-06-14 00:20:13 +02:00
Andrius Štikonas
9252bc6156
seteuid has to be used instead of setuid.
...
According to setuid manual, seteuid has to be used to be able to
regain root privileges later.
2017-06-12 22:00:36 +02:00
Andrius Štikonas
63ddb4e472
QList<QString> -> QStringList.
2017-06-12 12:47:17 +02:00
Andrius Štikonas
63b5c8c34c
Suspend Plasma removable device automounting.
...
Before doing operations, we connect to DBus session of the original user
and stop kded module for device automounting.
BUG: 368175
2017-06-07 19:21:59 +02:00
Andrius Štikonas
3228fa081a
Use qAsConst in ranged based for loops.
2017-06-04 22:26:24 +01:00
Andrius Štikonas
d2ce014589
Use range based for instead of Q_FOREACH.
...
Bump Qt version requirements to 5.7.0
2017-06-01 11:16:09 +01:00
Andrius Štikonas
5f0d1cd72b
Port qSort.
2017-05-03 19:24:20 +01:00
Andrius Štikonas
901d01185f
Do not set LUKS logical sector size to 512.
...
This breaks used space reporting for LUKS encrypted LVM LV.
2017-01-25 18:21:25 +01:00
Teo Mrnjavac
a749d1c84d
Handle parent change in Partition copy constructor.
2016-12-01 19:00:39 +01:00
Andrius Štikonas
2e960d5c00
Make initLUKS function non-static.
2016-11-30 17:18:51 +00:00
Andrius Štikonas
e0afdeb6cb
Move sorting comparison function to lambda.
2016-11-19 01:39:10 +00:00
Andrius Štikonas
6926046edb
Sort LVM LV volumes alphabetically.
2016-11-19 01:36:15 +00:00
Andrius Štikonas
3c58349561
Make sure KDiskFreeSpaceInfo is never used for swap.
2016-11-15 17:00:59 +00:00
Andrius Štikonas
a78e6f986e
Disable pasting into LVM VG. It does not yet work.
2016-11-10 14:52:02 +00:00
Andrius Štikonas
0c8035f667
Improve wording in comments a bit.
2016-11-10 14:37:48 +00:00
Andrius Štikonas
ee49c05d60
Remove ResizeVolumeGroup operation from operation stack if it has no jobs.
2016-11-07 18:56:26 +00:00
Andrius Štikonas
ca0def38f7
Add a comment.
2016-11-07 17:49:30 +00:00
Andrius Štikonas
4ed3ce6267
Check if fileSystem pointer is nullptr before trying to read used space
...
Hopefully it fixes the following crashes as well:
BUG: 364863
BUG: 365872
2016-11-07 17:45:22 +00:00
Andrius Štikonas
f948569fef
Pass --force to vgremove in order to allow removing deactivated volume groups.
2016-11-05 21:48:30 +00:00
Andrius Štikonas
e3214a1b48
Do not call KDiskFreeSpaceInfo::freeSpaceInfo without a non-empty mount point.
2016-11-05 20:29:31 +00:00