Skip to content
  • Eric Blake's avatar
    033d9fc2
    qemu-img: Change img_compare() to be byte-based · 033d9fc2
    Eric Blake authored
    
    
    In the continuing quest to make more things byte-based, change
    the internal iteration of img_compare().  We can finally drop the
    TODO assertions added earlier, now that the entire algorithm is
    byte-based and no longer has to shift from bytes to sectors.
    
    Most of the change is mechanical ('total_sectors' becomes
    'total_size', 'sector_num' becomes 'offset', 'nb_sectors' becomes
    'chunk', 'progress_base' goes from sectors to bytes); some of it
    is also a cleanup (sectors_to_bytes() is now unused, loss of
    variable 'count' added earlier in commit 51b0a488).
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    033d9fc2
    qemu-img: Change img_compare() to be byte-based
    Eric Blake authored
    
    
    In the continuing quest to make more things byte-based, change
    the internal iteration of img_compare().  We can finally drop the
    TODO assertions added earlier, now that the entire algorithm is
    byte-based and no longer has to shift from bytes to sectors.
    
    Most of the change is mechanical ('total_sectors' becomes
    'total_size', 'sector_num' becomes 'offset', 'nb_sectors' becomes
    'chunk', 'progress_base' goes from sectors to bytes); some of it
    is also a cleanup (sectors_to_bytes() is now unused, loss of
    variable 'count' added earlier in commit 51b0a488).
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading