gpt-auto: discard boot0/1 hw partitions along rpmb
authorNicolas Chauvet <kwizart@gmail.com>
Wed, 24 Jan 2018 09:05:28 +0000 (10:05 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 25 Jan 2018 13:25:27 +0000 (14:25 +0100)
/dev/mmcblk0boot0 is a partition found in eMMC
This is not relevant for mounting

This complement the previous fix as reported in
https://github.com/systemd/systemd/issues/5806

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
src/shared/dissect-image.c

index 1f0579f..86114e3 100644 (file)
@@ -355,7 +355,8 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, DissectI
                 /* Filter out weird MMC RPMB partitions, which cannot reasonably be read, see
                  * https://github.com/systemd/systemd/issues/5806 */
                 sysname = udev_device_get_sysname(q);
-                if (sysname && startswith(sysname, "mmcblk") && endswith(sysname, "rpmb"))
+                if (sysname && startswith(sysname, "mmcblk") &&
+                        (endswith(sysname, "rpmb") || endswith(sysname, "boot0" ) || endswith(sysname, "boot1")))
                         continue;
 
                 node = udev_device_get_devnode(q);