Adriaan de Groot
6324fa3eb9
[partition] Disentangle questions of suitability of ESP
...
- split into size, type, flags so the warning message can
be tailored to what is wrong.
2021-08-27 17:27:26 +02:00
Adriaan de Groot
52a82ea1e6
[partition] Improve warning message in log
2021-08-26 17:39:06 +02:00
Adriaan de Groot
96c2c62470
[partition] Fix build on older KPMCore
2021-07-06 12:59:01 +02:00
Adriaan de Groot
a4fadcd9be
[partition] Introduce check for EFI partition type-and-size
...
Re-use the existing message about partition type and size,
since I don't want to introduce another message with all the
specifics; give a works-always message instead.
The check itself is also straightforward, avoiding all of the
nuances and technically-this-might-work cases: FAT32, 300MiB+.
FIXES #607
2021-07-06 12:54:25 +02:00
Adriaan de Groot
b5c56fd579
[partition] Clarify comments on boot-flags
2021-07-05 13:33:09 +02:00
Adriaan de Groot
7ce2a87644
[partition] Fix build
...
- fsName was a QString (a copy) so it could be modified;
- the modification isn't really necessary.
- While here, pick up new PointerSetter convenience class.
2021-06-18 13:49:39 +02:00
Adriaan de Groot
9fa5ab04e5
[partition] Apply coding style to core/
2021-06-18 11:23:27 +02:00
Adriaan de Groot
f9659989b1
[partition] rename findFS
...
Rename findFS -> canonicalFilesystemName because that's what it actually
does. While here, apply coding style to the files that are affected.
2021-06-18 11:09:11 +02:00
Adriaan de Groot
1fe337d6ed
[partition] Improve logging of device-checking
...
- Avoid lots of function headers between the checks applied to
each individual device.
2021-03-29 15:25:57 +02:00
Adriaan de Groot
0446f03613
[partition] Remove overly-chatty debugging from fs-name-lookup
2021-03-29 14:38:39 +02:00
Gaël PORTAY
bf9c9a64f1
[libcalamares] Introduce new function getPartitionTable
2021-01-08 08:54:02 -05:00
Adriaan de Groot
0f38ee624e
[partition] static-assert that our shortcut makes sense
2020-11-04 09:59:35 +01:00
Adriaan de Groot
15ace5202d
[partition] Simplify EFI-flags checking with KPMCore 4
2020-11-04 01:16:36 +01:00
Adriaan de Groot
949e33f1e8
[partition] Massage logging while checking for EFI boot
2020-11-04 00:43:32 +01:00
Gaël PORTAY
f2bfe2bd6a
[partition] Fix coding style
2020-10-30 10:14:40 -04:00
Gaël PORTAY
cd725fbb4b
Fix missing SPDX-FileCopyrightText in header
2020-10-30 10:12:28 -04:00
Adriaan de Groot
01b75ef4b5
[partition] Use C++-style cast
2020-10-24 02:19:05 +02:00
Adriaan de Groot
eb8e95bb87
[partition] Warnings--, explain why we're using a void*
2020-10-23 22:39:05 +02:00
Gaël PORTAY
2b1e516ec1
[partition] Strip extra file after the at sign
...
- os-proper may return an extra file after the device:
/dev/sda1:Ubuntu 19.10 (19.10):Ubuntu:linux
/dev/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
2020-10-07 09:57:18 -04:00
Corentin Noël
08138f5a41
[partition] Reduce direct dependency of PartUtils on PartitionCoreModule
2020-10-06 14:28:20 +02:00
Adriaan de Groot
1cd9b93a22
REUSE: Giant boilerplate cleanup
...
- point to main Calamares site in the 'part of' headers instead
of to github (this is the "this file is part of Calamares"
opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
this is the 3-paragraph summary of the GPL-3.0-or-later, which has
a meaning entirely covered by the SPDX tag.
2020-08-26 02:28:38 +02:00
Adriaan de Groot
30a85668b7
REUSE: (GPL-3.0-or-later) C++ modules
2020-08-26 02:22:49 +02:00
Adriaan de Groot
22fdca8f44
[libcalamares] Use Logger::Pointer for logging void-pointers
2020-06-23 13:02:06 +02:00
Adriaan de Groot
7f295d9565
[partition] Apply coding style to core/ subdir
...
Because this is a giant code change, with no functional effect,
I've been saving this until the end of the kpmcore-manager branch.
2020-02-14 11:15:57 +01:00
Adriaan de Groot
f6d89354a1
Merge branch 'master' into kpmcore-manager
2020-01-10 14:54:13 +01:00
Andrius Štikonas
490c14d93d
QLatin1Literal->QLatin1String.
2019-09-21 20:44:33 +01:00
Adriaan de Groot
d3df346ce7
[libcalamares] Move TemporaryDir into TemporaryMount
...
- Only one user of TemporaryMount, and we should distinguish
"regular" temp mounts from temp mounts with a hand-picked
mount point.
2019-06-21 16:37:35 +02:00
Adriaan de Groot
ba7259d9ee
[partition] Use TemporaryMount support class
...
- While here, fix up compile warning
- add -R to umount for good measure
2019-06-20 14:49:44 +02:00
Adriaan de Groot
4b3bb54320
[libcalamares] Move partition-finding into libcalamares
...
- Moved from KPMHelpers to the partition service
- The is-partition and find-partition methods that make sense
in general, are moved to libcalamares.
2019-06-13 14:41:33 +02:00
Adriaan de Groot
4202126f34
[fsresizer] [partition] Fix build with moved headers
...
- PartitionIterator has moved into libcalamares
- While here, sort and organize #include lines
- Add using to keep code impact small
2019-06-13 12:27:39 +02:00
Adriaan de Groot
b5c50c8d04
[partition] Update canBeReplaced
...
- Use GiB consistently
- Provide same kind of debugging information as canBeResized()
2019-06-07 23:19:24 +02:00
Adriaan de Groot
79934aa513
[partition] Use GiB consistently in code
2019-06-07 23:04:24 +02:00
Adriaan de Groot
acf3dbcdcb
[partition] Refactor getting the globalStorage value
2019-06-07 22:55:50 +02:00
Adriaan de Groot
3548792d1b
[partition] Improve check canBeResized
...
- Report the globalSettings name properly (with "GiB")
- Bail out on bad conversion early.
2019-06-07 22:51:33 +02:00
Adriaan de Groot
bbd2afc20f
Merge branch 'issue-1129'
...
FIXES #1129
2019-05-09 08:14:25 -04:00
Arnaud Ferraris
80fd3d3353
[partition] Switch to using the generic PartitionSize class
...
Instead of relying on a module-specific implementation, use the new
PartitionSize class for storing partition sizes.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-05-08 19:31:20 +02:00
Arnaud Ferraris
36bc0e6308
[partition] Move bytesToSectors() to CalamaresUtils namespace
...
In order to prepare for future refactoring of the PartSize class, move
the bytesToSectors() function to libcalamares in the CalamaresUtils
namespace.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-05-08 19:20:38 +02:00
Adriaan de Groot
502d43d111
[welcome] [partition] Rename GlobalStorage variable used for storage
...
- Change name passed into GS to use "GiB" instead of "GB", for
consistency. This needs to be done in consumers as well.
2019-05-06 16:39:14 +02:00
Adriaan de Groot
3533bb3c2d
Merge branch 'master' into issue-1061
2019-04-24 12:26:01 -04:00
Arnaud Ferraris
d32733bf59
Switch to using PartSize class for partition sizes
...
Every call of `ParseStringSize` is replaced by using an instance of the
`PartUtils::PartSize` class.
This commit also removes the now-unused previous size parsing functions.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-04-18 10:55:47 +02:00
Arnaud Ferraris
3a58ae5e8b
Introduce new partition size class based on NamedSuffix
...
In order to maintain consistency, and make use, create a new PartSize
class in the PartUtils namespace, which inherits from NamedSuffix for
easier parsing and handling of size strings.
The switch to using this class instead of the previous functions will be
done in a follow-up commit.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-04-18 10:55:47 +02:00
Adriaan de Groot
93be1a6582
[partition] Remove confusing spaces in logging
2019-04-15 10:16:09 -04:00
Adriaan de Groot
75f1a05fec
[partition] No copy-constructor for CDebug
2019-04-15 10:05:29 -04:00
Adriaan de Groot
520478847c
Make logging more consistent.
...
- Across all the C++ modules, use Logger::SubEntry for sub/continues
log lines, instead of somewhat-random indent strings.
2019-04-15 09:02:21 -04:00
Adriaan de Groot
63b317902d
[libcalamares] [partition] Adjust to logging changes
...
- Use the un-paren'ed Continuation and SubEntry
2019-04-15 08:27:43 -04:00
Adriaan de Groot
4caa401a07
[partition] Use structured logging
...
- Structured logging
- Reduce chattiness
- Use helper functions
- Some TODO were done a while ago
2019-04-04 17:58:03 +02:00
Adriaan de Groot
df921606b9
[partition] Update copyright headers
...
- Files modified in 2019 by me
2019-04-01 07:55:14 -04:00
Adriaan de Groot
68f29ebf20
[partition] Handle partition flag FlagEsp post KPMCore 3.3.0
2019-03-20 18:13:39 +01:00
Adriaan de Groot
2a2795c54c
[partition] Avoid KPMCore warnings
...
- Get ready for KPMCore post-3.3.0, which deprecates a bunch of
Flag<foo> and State<foo> in preparation of enum classes.
2019-03-20 18:13:39 +01:00
Adriaan de Groot
5d6d2b8078
[partition] Make convenienceName() available for debugging
...
- Function for human-readable names is useful in more parts of
the partition module.
2019-03-20 11:26:02 +01:00