On Sun, Jan 28, 2018 at 11:54:19PM +0200, Mykola Ivanets wrote:
Instead of parsing 'parted' output OCaml implementation
relies on the following facts:
1. The function is applicable for MBR partitions only (as noted in documentation and as
function name suggests).
This might be how it's documented, but the implementation has a nod
towards gpt:
- for (i = 0, row = start; row < end; ++i, ++row) {
- if (STREQ (parttype, "gpt")) {
- memcpy (temp_type, "primary", strlen ("primary"));
whereas the replacement deliberately breaks this case:
+ failwithf "part_get_mbr_part_type can only be used on MBR
Partitions"
This change is too fundamental to go in just before the stable release
(1.38). I'm going to release 1.38 real soon and then we can look at
this again.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html