]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: Skip partitions with _empty label
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 28 Feb 2025 12:09:17 +0000 (13:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 28 Feb 2025 16:00:50 +0000 (17:00 +0100)
src/shared/dissect-image.c

index 724aedc532ee7d6fed79eb4ce27c329fd71a6f6d..b6563f9ab32d5cc88ec7d5b5e2178957772f2fa7 100644 (file)
@@ -1002,6 +1002,8 @@ static int dissect_image(
                         type = gpt_partition_type_from_uuid(type_id);
 
                         label = blkid_partition_get_name(pp); /* libblkid returns NULL here if empty */
+                        if (streq_ptr(label, "_empty"))
+                                continue;
 
                         log_debug("Dissecting %s partition with label %s and UUID %s",
                                   strna(partition_designator_to_string(type.designator)), strna(label), SD_ID128_TO_UUID_STRING(id));