turn err into errx in lguest call sites
[sfrench/cifs-2.6.git] / Documentation / lguest / lguest.c
index f7918401a0072c9b08bf81bb07434b66a96f6085..276f2f651286a600076c65333a5f9ca9ce2f2e76 100644 (file)
@@ -46,7 +46,7 @@ typedef uint32_t u32;
 typedef uint16_t u16;
 typedef uint8_t u8;
 #include "../../include/linux/lguest_launcher.h"
-#include "../../include/asm-i386/e820.h"
+#include "../../include/asm-x86/e820.h"
 /*:*/
 
 #define PAGE_PRESENT 0x7       /* Present, RW, Execute */
@@ -159,7 +159,7 @@ static unsigned long entry_point(void *start, void *end,
                if (memcmp(p, "GenuineLguest", strlen("GenuineLguest")) == 0)
                        return (long)p + strlen("GenuineLguest") + page_offset;
 
-       err(1, "Is this image a genuine lguest?");
+       errx(1, "Is this image a genuine lguest?");
 }
 
 /* This routine takes an open vmlinux image, which is in ELF, and maps it into
@@ -858,7 +858,7 @@ static u32 handle_block_output(int fd, const struct iovec *iov,
        /* We first check that the read or write is within the length of the
         * block file. */
        if (off >= device_len)
-               err(1, "Bad offset %llu vs %llu", off, device_len);
+               errx(1, "Bad offset %llu vs %llu", off, device_len);
        /* Move to the right location in the block file.  This shouldn't fail,
         * but best to check. */
        if (lseek64(dev->fd, off, SEEK_SET) != off)
@@ -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);
                }