On Fri, Sep 19, 2014 at 03:39:11PM +0800, Hu Tao wrote:
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> --- resize/resize.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml index f57b2ff..3db9291 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -1110,8 +1110,7 @@ read the man page virt-resize(1). ) partitions;
(* Copy over the data. *) - List.iter ( - fun p -> + let copy_partition p = match p.p_operation with | OpCopy | OpResize _ -> (* XXX Old code had 'when target_partnum > 0', but it appears @@ -1145,7 +1144,8 @@ read the man page virt-resize(1). g#copy_device_to_device ~srcoffset ~size:copysize "/dev/sda" target ) | OpIgnore | OpDelete -> () - ) partitions; + in + List.iter copy_partition partitions;
(* Set bootable and MBR IDs. Do this *after* copying over the data, * so that we can magically change the primary partition to an extended
ACKed and pushed. 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