• E
    qemu-img: Change compare_sectors() to be byte-based · dc61cd3b
    Eric Blake 提交于
    In the continuing quest to make more things byte-based, change
    compare_sectors(), renaming it to compare_buffers() in the
    process.  Note that one caller (qemu-img compare) only cares
    about the first difference, while the other (qemu-img rebase)
    cares about how many consecutive sectors have the same
    equal/different status; however, this patch does not bother to
    micro-optimize the compare case to avoid the comparisons of
    sectors beyond the first mismatch.  Both callers are always
    passing valid buffers in, so the initial check for buffer size
    can be turned into an assertion.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    Reviewed-by: NJohn Snow <jsnow@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    dc61cd3b
qemu-img.c 139.9 KB