--- Begin Message ---
Package: ploop
Version: 1.11-1
On mips64el, long long and long has the same 64bit width, while
they are totally different type.
Not very sure about why.
--
YunQiang Su
Index: ploop-1.11/lib/balloon_util.c
===================================================================
--- ploop-1.11.orig/lib/balloon_util.c 2033-12-08 10:13:44.066252533 +0800
+++ ploop-1.11/lib/balloon_util.c 2033-12-08 10:13:44.050627531 +0800
@@ -273,14 +273,14 @@
ploop_err(0,
"Image corrupted: L2[%u] == %u
(max=%llu)",
clu + j - l2_slot, delta->l2[j],
- (rlen - 1) * B2S(cluster));
+ (long long unsigned)(rlen - 1) *
B2S(cluster));
return(SYSEXIT_PLOOPFMT);
}
if (ridx < delta->l1_size) {
ploop_err(0,
"Image corrupted: L2[%u] == %u
(min=%llu)",
clu + j - l2_slot, delta->l2[j],
- delta->l1_size * B2S(cluster));
+ (long long unsigned)(delta->l1_size *
B2S(cluster)));
return(SYSEXIT_PLOOPFMT);
}
@@ -538,14 +538,14 @@
ploop_err(0,
"Image corrupted: L2[%u] == %u (max=%llu) (2)",
clu, delta->l2[l2_slot],
- (rlen - 1) * B2S(cluster));
+ (long long unsigned)((rlen - 1) *
B2S(cluster)));
return SYSEXIT_PLOOPFMT;
}
if (ridx && ridx < delta->l1_size) {
ploop_err(0,
"Image corrupted: L2[%u] == %u (min=%llu) (2)",
clu, delta->l2[l2_slot],
- delta->l1_size * B2S(cluster));
+ (long long unsigned)(delta->l1_size *
B2S(cluster)));
return SYSEXIT_PLOOPFMT;
}
Index: ploop-1.11/lib/check.c
===================================================================
--- ploop-1.11.orig/lib/check.c 2014-04-04 06:09:18.000000000 +0800
+++ ploop-1.11/lib/check.c 2033-12-08 10:14:00.597503828 +0800
@@ -552,7 +552,7 @@
ploop_err(0, "Delta file %s contains
uninitialized blocks"
" (offset=%llu len=%llu)"
" which are not aligned to
cluster size",
- image, fm_ext[i].fe_logical,
fm_ext[i].fe_length);
+ image, (long long
unsigned)fm_ext[i].fe_logical, (long long unsigned)fm_ext[i].fe_length);
if (fill_hole(image, fd, fm_ext[i].fe_logical,
fm_ext[i].fe_logical +
fm_ext[i].fe_length, &log, repair))
Index: ploop-1.11/lib/ploop.c
===================================================================
--- ploop-1.11.orig/lib/ploop.c 2014-04-04 06:09:18.000000000 +0800
+++ ploop-1.11/lib/ploop.c 2033-12-08 10:38:39.667932199 +0800
@@ -273,7 +273,7 @@
if (sectors > max) {
ploop_err(0, "An incorrect block device size is specified: %llu
sectors."
" The maximum allowed size is %llu sectors",
- sectors, max);
+ (long long unsigned)sectors, (long long
unsigned)max);
return -1;
}
return 0;
@@ -2273,7 +2273,7 @@
ploop_err(0, "Unable to change image
size to %lu "
"sectors, minimal size
is %llu",
(long)new_fs_size,
- (blocks -
available_balloon_size));
+ (long long
unsigned)(blocks - available_balloon_size));
ret = SYSEXIT_PARAM;
goto err;
}
Index: ploop-1.11/lib/balloon.c
===================================================================
--- ploop-1.11.orig/lib/balloon.c 2014-04-04 06:09:18.000000000 +0800
+++ ploop-1.11/lib/balloon.c 2033-12-08 10:42:29.695293969 +0800
@@ -860,7 +860,7 @@
range.minlen = MAX(MAX_DISCARD_CLU * cluster, minlen_b);
for (; range.minlen >= minlen_b; range.minlen /= 2) {
- ploop_log(1, "Call FITRIM, for minlen=%lld", range.minlen);
+ ploop_log(1, "Call FITRIM, for minlen=%llu", (unsigned long
long)range.minlen);
ret = ioctl(fd, FITRIM, &range);
if (ret < 0) {
if (trim_stop)
@@ -894,7 +894,7 @@
if (start % S2B(cluster) && len > range[1])
range[1] -= start % S2B(cluster);
- ploop_log(1, "Call BLKDISCARD start=%llu length=%llu ",
range[0], range[1]);
+ ploop_log(1, "Call BLKDISCARD start=%llu length=%llu ",
(unsigned long long)range[0], (unsigned long long)range[1]);
ret = ioctl_device(fd, BLKDISCARD, range);
if (ret)
return ret;
@@ -918,9 +918,9 @@
if (blk_discard_range != NULL)
ploop_log(0, "Discard %s start=%llu length=%llu",
- device, blk_discard_range[0],
blk_discard_range[1]);
+ device, (unsigned long
long)blk_discard_range[0], (unsigned long long)blk_discard_range[1]);
else
- ploop_log(3, "Trying to find free extents bigger than %llu
bytes", minlen_b);
+ ploop_log(3, "Trying to find free extents bigger than %llu
bytes", (unsigned long long)minlen_b);
if (ploop_lock_di(di))
return SYSEXIT_LOCK;
Index: ploop-1.11/lib/fsutils.c
===================================================================
--- ploop-1.11.orig/lib/fsutils.c 2014-04-04 06:09:18.000000000 +0800
+++ ploop-1.11/lib/fsutils.c 2033-12-08 10:59:16.953185377 +0800
@@ -73,7 +73,7 @@
char s1[22], s2[22];
if (size <= start + blocksize) {
- ploop_err(0, "Image size should be greater than %llu", start);
+ ploop_err(0, "Image size should be greater than %llu",
(unsigned long long)start);
return -1;
}
argv[0] = "parted";
@@ -121,7 +121,7 @@
if (max_online_resize > (__u32)~0)
max_online_resize = (__u32)~0;
snprintf(ext_opts, sizeof(ext_opts), "-Elazy_itable_init,resize=%llu",
- max_online_resize);
+ (unsigned long long)max_online_resize);
argv[5] = ext_opts;
/* Set the journal size to 128M to allow online resize up to 16T
* independly on the initial image size
@@ -161,12 +161,12 @@
reserved_blocks = size_sec / 100 * 5 * SECTOR_SIZE / fs.f_bsize;
if (reserved_blocks == 0) {
ploop_err(0, "Can't set reserved blocks for size %llu",
- size_sec);
+ (unsigned long long)size_sec);
return;
}
argv[0] = get_prog(tune2fs_progs);
argv[1] = "-r";
- snprintf(buf, sizeof(buf), "%llu", reserved_blocks);
+ snprintf(buf, sizeof(buf), "%llu", (unsigned long long)reserved_blocks);
argv[2] = buf;
argv[3] = (char *)device;
argv[4] = NULL;
@@ -222,10 +222,10 @@
while (fgets(buf, sizeof(buf), fp) != NULL) {
if ((found & BLOCK_COUNT_BIT) &&
- sscanf(buf, "Block count: %llu",
&data->block_count) == 1)
+ sscanf(buf, "Block count: %llu", (long long
unsigned *)&data->block_count) == 1)
found &= ~BLOCK_COUNT_BIT;
else if ((found & BLOCK_FREE_BIT) &&
- sscanf(buf, "Free blocks: %llu",
&data->block_free) == 1)
+ sscanf(buf, "Free blocks: %llu", (long long
unsigned *)&data->block_free) == 1)
found &= ~BLOCK_FREE_BIT;
else if ((found & BLOCK_SIZE_BIT) &&
sscanf(buf, "Block size: %u",
&data->block_size) == 1)
Index: ploop-1.11/lib/gpt.c
===================================================================
--- ploop-1.11.orig/lib/gpt.c 2014-04-04 06:09:18.000000000 +0800
+++ ploop-1.11/lib/gpt.c 2033-12-08 11:01:51.652416247 +0800
@@ -170,7 +170,7 @@
part.length = (pe->ending_lba - pe->starting_lba + 1) * sector_size;
ploop_log(3, "update partition table start=%llu length=%llu",
- part.start, part.length);
+ (long long unsigned)part.start, (long long
unsigned)part.length);
ioctl_arg.op = BLKPG_RESIZE_PARTITION;
ioctl_arg.flags = 0;
ioctl_arg.datalen = sizeof(struct blkpg_partition);
@@ -226,7 +226,7 @@
if (new_size512 > size) {
ploop_err(0, "Unable to resize GPT partition:"
" incorrect parameter new_size=%llu size=%lu",
- new_size512, (long)size);
+ (long long unsigned)new_size512, (long)size);
return SYSEXIT_PARAM;
}
--- End Message ---