diff options
| author | Eric Blake <eblake@redhat.com> | 2017-10-11 22:47:14 -0500 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2017-10-26 14:45:57 +0200 |
| commit | dc61cd3b144151024a247a109f360d2e2cab0f81 (patch) | |
| tree | 15e9090999c2de05a34c87ad2c0b00fbb4be46d5 /qemu-io-cmds.c | |
| parent | c41508edc68aefb784c3b750bbbff472eca1a3c5 (diff) | |
| download | focaccia-qemu-dc61cd3b144151024a247a109f360d2e2cab0f81.tar.gz focaccia-qemu-dc61cd3b144151024a247a109f360d2e2cab0f81.zip | |
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-cmds.c')
0 files changed, 0 insertions, 0 deletions