aboutsummaryrefslogtreecommitdiff
path: root/block/vvfat.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-06-07 16:34:45 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-07 16:34:45 +0100
commit6ed5546fa7bf12c5b87ef76bafb86e1d77ed6e85 (patch)
tree856364b55688b61a141f32b6617aaa786177b258 /block/vvfat.c
parent40eeb397c8b8008aa13bca3a8cb25d152eb5ab44 (diff)
parent30f549c2f30de65c7cbb30614b838d5478d6221b (diff)
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2016-06-07' into staging
trivial patches for 2016-06-07 # gpg: Signature made Tue 07 Jun 2016 16:20:52 BST # gpg: using RSA key 0xBEE59D74A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" * remotes/mjt/tags/pull-trivial-patches-2016-06-07: (51 commits) hbitmap: Use DIV_ROUND_UP qemu-timer: Use DIV_ROUND_UP linux-user: Use DIV_ROUND_UP slirp: Use DIV_ROUND_UP usb: Use DIV_ROUND_UP rocker: Use DIV_ROUND_UP SPICE: Use DIV_ROUND_UP audio: Use DIV_ROUND_UP xen: Use DIV_ROUND_UP crypto: Use DIV_ROUND_UP block: Use DIV_ROUND_UP qed: Use DIV_ROUND_UP qcow/qcow2: Use DIV_ROUND_UP parallels: Use DIV_ROUND_UP coccinelle: use macro DIV_ROUND_UP instead of (((n) + (d) - 1) /(d)) thunk: Rename args and fields in host-target bitmask conversion code thunk: Drop unused NO_THUNK_TYPE_SIZE guards qemu-common.h: Drop WORDS_ALIGNED define host-utils: Prefer 'false' for bool type docs/multi-thread-compression: Fix wrong command string ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/vvfat.c')
-rw-r--r--block/vvfat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/vvfat.c b/block/vvfat.c
index a39dbe67e2..6d2e21ce11 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -1960,8 +1960,7 @@ DLOG(fprintf(stderr, "check direntry %d:\n", i); print_direntry(direntries + i))
/* check file size with FAT */
cluster_count = get_cluster_count_for_direntry(s, direntries + i, path2);
if (cluster_count !=
- (le32_to_cpu(direntries[i].size) + s->cluster_size
- - 1) / s->cluster_size) {
+ DIV_ROUND_UP(le32_to_cpu(direntries[i].size), s->cluster_size)) {
DLOG(fprintf(stderr, "Cluster count mismatch\n"));
goto fail;
}