summaryrefslogtreecommitdiffstats
path: root/src/partition
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-05-19 09:23:00 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-19 15:04:01 +0200
commitfeb13fca97532b0a411a633fd601b93aa6f9275f (patch)
tree18e022765e625e89315c64a89494c777b7d9052c /src/partition
parentMerge pull request #15842 from evverx/cifuzz (diff)
downloadsystemd-feb13fca97532b0a411a633fd601b93aa6f9275f.tar.xz
systemd-feb13fca97532b0a411a633fd601b93aa6f9275f.zip
repart: don't insist on coming up on partition label ourselves
If the user specified a label, use that. Fixes: #15841
Diffstat (limited to 'src/partition')
-rw-r--r--src/partition/repart.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c
index 4c738920ab..46e82eaf90 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -2233,7 +2233,6 @@ static int context_acquire_partition_uuids_and_labels(Context *context) {
LIST_FOREACH(partitions, p, context->partitions) {
assert(sd_id128_is_null(p->new_uuid));
- assert(!p->new_label);
/* Never touch foreign partitions */
if (PARTITION_IS_FOREIGN(p)) {
@@ -2256,6 +2255,9 @@ static int context_acquire_partition_uuids_and_labels(Context *context) {
return r;
}
+ if (p->new_label) /* Explicitly set by user? */
+ continue;
+
if (!isempty(p->current_label)) {
p->new_label = strdup(p->current_label); /* never change initialized labels */
if (!p->new_label)