[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH v3 2/7] resize: simplify the code to filter parts



On Mon, Sep 22, 2014 at 03:47:35PM +0800, Hu Tao wrote:
> Signed-off-by: Hu Tao <hutao cn fujitsu com>
> ---
>  resize/resize.ml | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/resize/resize.ml b/resize/resize.ml
> index 72c4da2..8f2105c 100644
> --- a/resize/resize.ml
> +++ b/resize/resize.ml
> @@ -454,13 +454,8 @@ read the man page virt-resize(1).
>  
>      (* Filter out logical partitions.  See note above. *)
>      let parts =
> -      match parttype with
> -      | GPT -> parts
> -      | MBR ->
> -        List.filter (function
> -        | { G.part_num = part_num } when part_num >= 5_l -> false
> -        | _ -> true
> -        ) parts in
> +        List.filter (fun p -> parttype <> MBR || p.G.part_num <= 4_l)
> +        parts in
>  
>      let partitions =
>        List.map (

ACK.  I'll push this later today.

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]