]> err.no Git - linux-2.6/blobdiff - Documentation/lguest/lguest.c
lguest example launcher truncates block device file to 0 length on problems
[linux-2.6] / Documentation / lguest / lguest.c
index f7918401a0072c9b08bf81bb07434b66a96f6085..73c5f1f3d5d2e726c287396224df53cfca1bc65d 100644 (file)
@@ -882,7 +882,7 @@ static u32 handle_block_output(int fd, const struct iovec *iov,
                 * of the block file (possibly extending it). */
                if (off + len > device_len) {
                        /* Trim it back to the correct length */
-                       ftruncate(dev->fd, device_len);
+                       ftruncate64(dev->fd, device_len);
                        /* Die, bad Guest, die. */
                        errx(1, "Write past end %llu+%u", off, len);
                }