diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-06-09 10:51:20 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-06-09 10:51:20 +0200 |
commit | a3071999b83f53b37b24140baf64ef771b9f3e26 (patch) | |
tree | 724f4acfc9ce083bc09d00897b10a339b2caf013 | |
parent | 9d3e340639bc0b4610f7ece98a84157dbc1c2c8f (diff) |
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: 0238d4c660e732dd03ba0cdb54a29ec5870ee849
Fixes: #3440
Also see: #3441
-rw-r--r-- | src/udev/udev-builtin-blkid.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c index ed0ea5ce5f..3c58445836 100644 --- a/src/udev/udev-builtin-blkid.c +++ b/src/udev/udev-builtin-blkid.c @@ -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. */ |