[Pkg-libvirt-commits] [libguestfs] 01/19: resize: add sector size in debug_partition

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:12:28 UTC 2015


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

bengen pushed a commit to annotated tag upstream/1.29.44
in repository libguestfs.

commit 0fbe8fb3e0e2adb0ee56a8af13e98c3c98fd4d20
Author: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
Date:   Mon May 18 06:30:07 2015 -0400

    resize: add sector size in debug_partition
    
    This patch will add fields of sector size for:
      - partition sector data size
      - target partition sector data size
    
    Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 resize/resize.ml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/resize/resize.ml b/resize/resize.ml
index 4e58e84..602a583 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -81,10 +81,11 @@ let rec debug_partition ?(sectsize=512L) p =
   printf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n"
     p.p_part.G.part_num p.p_part.G.part_start p.p_part.G.part_end
     p.p_part.G.part_size;
-  printf "\tpartition sector data: %Ld-%Ld\n"
-    (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize);
-  printf "\ttarget partition sector data: %Ld-%Ld \n"
-    p.p_target_start p.p_target_end;
+  printf "\tpartition sector data: %Ld-%Ld (%Ld sectors)\n"
+    (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize)
+    ((p.p_part.G.part_end +^ 1L -^ p.p_part.G.part_start) /^ sectsize);
+  printf "\ttarget partition sector data: %Ld-%Ld (%Ld sectors)\n"
+    p.p_target_start p.p_target_end (p.p_target_end +^ 1L -^ p.p_target_start);
   printf "\tbootable: %b\n" p.p_bootable;
   printf "\tpartition ID: %s\n"
     (match p.p_id with

-- 
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