Richard W.M. Jones
2018-Feb-06 08:31 UTC
Re: [Libguestfs] [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
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
Nikolay Ivanets
2018-Feb-19 19:48 UTC
Re: [Libguestfs] [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
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@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
Richard W.M. Jones
2018-Feb-20 09:48 UTC
Re: [Libguestfs] [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
On Mon, Feb 19, 2018 at 09:48:39PM +0200, Nikolay Ivanets wrote:> Richard, 1.38 is out. Can we come back and discuss these patch series?Can you repost it, rebased, and taking into account the review comments from last time. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Maybe Matching Threads
- Re: [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
- [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
- [PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
- Re: [PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
- [PATCH v5 0/3] libguestfs: guestfs_list_filesystems: skip block devices which cannot hold file system