udev-builtin-blkid: fix GPT_FLAG_NO_AUTO check for ESP (#3450)

The flags check was accidentally placed in the ESP if block, but should be in
the root if block.

This corrects: 0238d4c660

Fixes: #3440

Also see: #3441
This commit is contained in:
Lennart Poettering 2016-06-09 10:51:20 +02:00 committed by Martin Pitt
parent 9d3e340639
commit a3071999b8

View file

@ -147,11 +147,6 @@ 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. */
@ -167,6 +162,11 @@ static int find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) {
found_esp = true;
} else if (sd_id128_equal(type, GPT_ROOT_NATIVE)) {
unsigned long long flags;
flags = blkid_partition_get_flags(pp);
if (flags & GPT_FLAG_NO_AUTO)
continue;
/* We found a suitable root partition, let's
* remember the first one. */