Files
libguestfs/daemon
Laszlo Ersek edfebee404 daemon/parted: work around part table type misreporting by "parted"
"parted" incorrectly reports "loop" rather than "msdos" for the partition
table type, when the (fake) partition table comes from the "--mbr" option
of "mkfs.fat" (in dosfstools-4.2+), and the FAT variant in question is
FAT16 or FAT32. (See RHBZ#2026224.) Work this around by
- parsing the partition table ourselves, and
- overriding "loop" with "msdos" when appropriate.

Note that when the FAT variant is FAT12, "parted" fails to parse the fake
MBR partition table completely (see RHBZ#2026220), which we cannot work
around. However, FAT12 should be a rare corner case in libguestfs usage --
"mkfs.fat" auto-chooses FAT12 only below 9MB disk size, and even "-F 12"
can only be forced up to and including 255MB disk size.

Add the helper function "has_bogus_mbr" to the Utils module; we'll use it
elsewhere too.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1931821
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
Message-Id: <20211125094954.9713-5-lersek@redhat.com>
[lersek@redhat.com: drop "fun" keyword, and use partial application, in
 the definition of "sec0at" [Rich]]
2021-11-26 10:17:05 +01:00
..
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2021-04-08 11:36:40 +01:00
2017-07-27 17:31:41 +01:00
2019-11-28 13:09:21 +01:00
2020-03-06 19:32:32 +00:00
2021-03-16 11:24:37 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2018-04-19 11:30:29 +02:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2021-04-08 11:36:40 +01:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-05-13 09:19:31 +01:00
2017-07-27 17:31:41 +01:00
2018-02-12 11:24:06 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-03-27 09:31:00 +00:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-10 17:01:59 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2015-07-02 16:08:44 +01:00
2020-03-06 19:32:32 +00:00
2015-10-05 14:28:33 +01:00
2021-03-30 12:56:58 +01:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00