- This is an older copy of kdsingleapplicationguard, now updated for
C++11 warnings; removed __ in header guards, fixed up last of 0-for-
nullptr, signedness mismatch.
This commit adds several checks while reading the configuration of the
`partition` module, in case the partition layout configuration is
misformed. If an error is encountered, an message is printed to the
console and the module reverts to the default partition layout.
Checks are also added when implementing the partition layout, in case a
problem occurs that couldn't be anticipated (for example, when a
partition size is in %, checking its absolute value require knowing the
total device size, which is not the case when the configuration is
being read).
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
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>
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>
Fixed 'prepend' terminology in comments, restored old loop as it seems to work for me now in overwriting the file as one overall multiline instead of overwriting the file with each line at a time, code simplification based on review comments... credits-adding will come in the next commit.
This change fixes a few issues and adds a few improvements to the LightDM Autologin configuration process:
Fixes:
- Fixes malforming of configuration file out of the box, as without `[SeatDefaults]`, `[Seat:*]` or similar in the configuration file LightDM will break on a lot of distributions using LightDM
- Preserves the intended lightdm.conf file settings outside of `autologin-user` if the distribution has an /etc/lightdm/lightdm.conf file of its own
Misc. changes:
- Small spelling fix
- Instead of Continuation(), write just Continuation
- All that futzing with overloads and tag-classes isn't needed
since the whole point is to output some constant string. Leave
cleverness for later, if it's needed.
- KDE neon ships a post-3.3.0 KPMCore, with deprecations, but not yet
the KPMCore 4 API, so add another API-version check to handle the
deprecations. Keeps warnings down.