Commit:     f6a592e8abd2f2394623ce5427cbb4c265495974
Parent:     78bd8fbbcd66fc977baa40e7fd838a4461b0f727
Author:     Chris Malley <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 26 14:19:18 2007 +1000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Sep 26 09:22:04 2007 -0700

    lguest example launcher truncates block device file to 0 length on problems
    The function should also use ftruncate64() rather than ftruncate() to 
    files over 4GB (not uncommon for a root filesystem) being zeroed.
    Signed-off-by: Chris Malley <[EMAIL PROTECTED]>
    Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 Documentation/lguest/lguest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index f791840..73c5f1f 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -882,7 +882,7 @@ static u32 handle_block_output(int fd, const struct iovec 
                 * 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);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to