[Pkg-libvirt-commits] [libguestfs] 26/66: resize: simplify the code to filter parts

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:47:38 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.27.54-1
in repository libguestfs.

commit cd86bc510006fce668fe212b35ee19b5c3fdcb68
Author: Hu Tao <hutao at cn.fujitsu.com>
Date:   Mon Sep 22 15:47:35 2014 +0800

    resize: simplify the code to filter parts
    
    Signed-off-by: Hu Tao <hutao at 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 356303c..81bb270 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -451,13 +451,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 (

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list