[Libguestfs] [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.

Nikolay Ivanets stenavin at gmail.com
Mon Feb 19 19:48:39 UTC 2018


Richard, 1.38 is out. Can we come back and discuss these patch series?
--
    Mykola Ivanets


2018-02-06 10:31 GMT+02:00 Richard W.M. Jones <rjones at redhat.com>:
> 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




More information about the Libguestfs mailing list