93 Commits (5e7746668eab00141911c79ce92cb270a700a459)

Author SHA1 Message Date
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.
5 years ago
Adriaan de Groot 52a82ea1e6 [partition] Improve warning message in log 5 years ago
Adriaan de Groot 96c2c62470 [partition] Fix build on older KPMCore 5 years ago
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
5 years ago
Adriaan de Groot b5c56fd579 [partition] Clarify comments on boot-flags 5 years ago
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.
5 years ago
Adriaan de Groot 9fa5ab04e5 [partition] Apply coding style to core/ 5 years ago
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.
5 years ago
Adriaan de Groot 1fe337d6ed [partition] Improve logging of device-checking
- Avoid lots of function headers between the checks applied to
  each individual device.
6 years ago
Adriaan de Groot 0446f03613 [partition] Remove overly-chatty debugging from fs-name-lookup 6 years ago
Gaël PORTAY bf9c9a64f1 [libcalamares] Introduce new function getPartitionTable 6 years ago
Adriaan de Groot 0f38ee624e [partition] static-assert that our shortcut makes sense 6 years ago
Adriaan de Groot 15ace5202d [partition] Simplify EFI-flags checking with KPMCore 4 6 years ago
Adriaan de Groot 949e33f1e8 [partition] Massage logging while checking for EFI boot 6 years ago
Gaël PORTAY f2bfe2bd6a [partition] Fix coding style 6 years ago
Gaël PORTAY cd725fbb4b Fix missing SPDX-FileCopyrightText in header 6 years ago
Adriaan de Groot 01b75ef4b5 [partition] Use C++-style cast 6 years ago
Adriaan de Groot eb8e95bb87 [partition] Warnings--, explain why we're using a void* 6 years ago
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
6 years ago
Corentin Noël 08138f5a41 [partition] Reduce direct dependency of PartUtils on PartitionCoreModule 6 years ago
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.
6 years ago
Adriaan de Groot 30a85668b7 REUSE: (GPL-3.0-or-later) C++ modules 6 years ago
Adriaan de Groot 22fdca8f44 [libcalamares] Use Logger::Pointer for logging void-pointers 6 years ago
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.
7 years ago
Adriaan de Groot f6d89354a1 Merge branch 'master' into kpmcore-manager 7 years ago
Andrius Štikonas 490c14d93d QLatin1Literal->QLatin1String. 7 years ago
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.
7 years ago
Adriaan de Groot ba7259d9ee [partition] Use TemporaryMount support class
- While here, fix up compile warning
 - add -R to umount for good measure
7 years ago
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.
7 years ago
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
7 years ago
Adriaan de Groot b5c50c8d04 [partition] Update canBeReplaced
- Use GiB consistently
 - Provide same kind of debugging information as canBeResized()
7 years ago
Adriaan de Groot 79934aa513 [partition] Use GiB consistently in code 7 years ago
Adriaan de Groot acf3dbcdcb [partition] Refactor getting the globalStorage value 7 years ago
Adriaan de Groot 3548792d1b [partition] Improve check canBeResized
- Report the globalSettings name properly (with "GiB")
 - Bail out on bad conversion early.
7 years ago
Adriaan de Groot bbd2afc20f Merge branch 'issue-1129'
FIXES #1129
7 years ago
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>
7 years ago
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>
7 years ago
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.
7 years ago
Adriaan de Groot 3533bb3c2d Merge branch 'master' into issue-1061 8 years ago
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>
8 years ago
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>
8 years ago
Adriaan de Groot 93be1a6582 [partition] Remove confusing spaces in logging 8 years ago
Adriaan de Groot 75f1a05fec [partition] No copy-constructor for CDebug 8 years ago
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.
8 years ago
Adriaan de Groot 63b317902d [libcalamares] [partition] Adjust to logging changes
- Use the un-paren'ed Continuation and SubEntry
8 years ago
Adriaan de Groot 4caa401a07 [partition] Use structured logging
- Structured logging
 - Reduce chattiness
 - Use helper functions
 - Some TODO were done a while ago
8 years ago
Adriaan de Groot df921606b9 [partition] Update copyright headers
- Files modified in 2019 by me
8 years ago
Adriaan de Groot 68f29ebf20 [partition] Handle partition flag FlagEsp post KPMCore 3.3.0 8 years ago
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.
8 years ago
Adriaan de Groot 5d6d2b8078 [partition] Make convenienceName() available for debugging
- Function for human-readable names is useful in more parts of
   the partition module.
8 years ago