dissect-image: don't probe swap partitions needlessly

We already know it's swap, we can assume it's also fstype swap, and
don#t need to probe things later again.
This commit is contained in:
Lennart Poettering
2022-11-29 18:34:29 +01:00
parent cb8d22fa84
commit df4524cb37
+2
View File
@@ -811,6 +811,8 @@ static int dissect_image(
if (pflags & SD_GPT_FLAG_NO_AUTO)
continue;
fstype = "swap";
/* We don't have a designator for SD_GPT_LINUX_GENERIC so check the UUID instead. */
} else if (sd_id128_equal(type.uuid, SD_GPT_LINUX_GENERIC)) {