aboutsummaryrefslogtreecommitdiff
path: root/qemu-io.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2017-10-11 22:47:14 -0500
committerKevin Wolf <kwolf@redhat.com>2017-10-26 14:45:57 +0200
commitdc61cd3b144151024a247a109f360d2e2cab0f81 (patch)
tree15e9090999c2de05a34c87ad2c0b00fbb4be46d5 /qemu-io.c
parentc41508edc68aefb784c3b750bbbff472eca1a3c5 (diff)
downloadqemu-dc61cd3b144151024a247a109f360d2e2cab0f81.zip
qemu-dc61cd3b144151024a247a109f360d2e2cab0f81.tar.gz
qemu-dc61cd3b144151024a247a109f360d2e2cab0f81.tar.bz2
qemu-img: Change compare_sectors() to be byte-based
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: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-io.c')
0 files changed, 0 insertions, 0 deletions