]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: Fix build on i686
authorJiri Denemark <jdenemar@redhat.com>
Tue, 28 Mar 2017 10:48:31 +0000 (12:48 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 28 Mar 2017 10:53:56 +0000 (12:53 +0200)
off_t is signed and it's size is the same as long only on 64b archs.
Thus it cannot be formatted as %lu.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/storage/storage_backend_logical.c

index 9ca6fd43ba961e70f07aac06b5da60521a296f8f..d87aaf0b642b36303f858775010d3b92a560078f 100644 (file)
@@ -116,9 +116,9 @@ virStorageBackendLogicalInitializeDevice(const char *path)
 
     if (size < 4 * PV_BLANK_SECTOR_SIZE) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-                       _("cannot initialize '%s' detected size='%lu' less "
+                       _("cannot initialize '%s' detected size='%zd' less "
                          "than minimum required='%d"),
-                         path, size, 4 * PV_BLANK_SECTOR_SIZE);
+                         path, (ssize_t) size, 4 * PV_BLANK_SECTOR_SIZE);
         goto cleanup;
     }
     if ((size = lseek(fd, 0, SEEK_SET)) == (off_t)-1) {