From 0238d4c660e732dd03ba0cdb54a29ec5870ee849 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 11 Aug 2015 13:07:25 +0200 Subject: gpt-auto-generator: apply partition-type flags only to specific partition-types The partition-type flags are defined independently for every partition-type. Apply them only to the types where they are defined, and not to the ESP, which does not appear to share the same set of flags. https://github.com/systemd/systemd/issues/920 --- src/udev/udev-builtin-blkid.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/udev') diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c index 1dad4476f3..b8066ea6e9 100644 --- a/src/udev/udev-builtin-blkid.c +++ b/src/udev/udev-builtin-blkid.c @@ -143,6 +143,11 @@ static int find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) { if (sd_id128_equal(type, GPT_ESP)) { sd_id128_t id, esp; + unsigned long long flags; + + flags = blkid_partition_get_flags(pp); + if (flags & GPT_FLAG_NO_AUTO) + continue; /* We found an ESP, let's see if it matches * the ESP we booted from. */ -- cgit v1.2.3-54-g00ecf