Commit 164e048a authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

zdtm/ia32: print st_size as (long long)

Fixes compile-time errors on Fedora like:
In file included from unlink_fstat01.c:9:0:
> unlink_fstat01.c: In function ‘main’:
> ../lib/zdtmtst.h:123:11: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘__off64_t {aka long long int}’ [-Werror=format=]
>   test_msg("FAIL: %s:%d: " format " (errno = %d (%s))\n", \
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent e98d16e7
......@@ -220,18 +220,21 @@ static int check_fd(struct autofs_params *p)
ret++;
}
if (st.st_size != p->fd_stat.st_size) {
pr_err("%s: st_size differs: %ld != %ld\n", p->mountpoint,
st.st_size, p->fd_stat.st_size);
pr_err("%s: st_size differs: %lld != %lld\n", p->mountpoint,
(long long)st.st_size,
(long long)p->fd_stat.st_size);
ret++;
}
if (st.st_blksize != p->fd_stat.st_blksize) {
pr_err("%s: st_blksize differs %ld != %ld:\n", p->mountpoint,
(long)st.st_blksize, (long)p->fd_stat.st_blksize);
pr_err("%s: st_blksize differs %lld != %lld:\n", p->mountpoint,
(long long)st.st_blksize,
(long long)p->fd_stat.st_blksize);
ret++;
}
if (st.st_blocks != p->fd_stat.st_blocks) {
pr_err("%s: st_blocks differs: %ld != %ld\n", p->mountpoint,
st.st_blocks, p->fd_stat.st_blocks);
pr_err("%s: st_blocks differs: %lld != %lld\n", p->mountpoint,
(long long)st.st_blocks,
(long long)p->fd_stat.st_blocks);
ret++;
}
......
......@@ -70,13 +70,15 @@ int main(int argc, char ** argv)
}
if (fst.st_size != fsize) {
fail("(via fstat): file size changed to %ld", fst.st_size);
fail("(via fstat): file size changed to %lld",
(long long)fst.st_size);
goto failed;
}
fst.st_size = lseek(fd, 0, SEEK_END);
if (fst.st_size != fsize) {
fail("(via lseek): file size changed to %ld", fst.st_size);
fail("(via lseek): file size changed to %lld",
(long long)fst.st_size);
goto failed;
}
......
......@@ -47,7 +47,8 @@ int main(int argc, char ** argv)
}
if (fst.st_size != 0) {
pr_perror("%s file size eq %ld", filename, fst.st_size);
pr_perror("%s file size eq %lld",
filename, (long long)fst.st_size);
goto failed;
}
......@@ -86,13 +87,15 @@ int main(int argc, char ** argv)
}
if (fst.st_size != fsize) {
fail("(via fstat): file size changed to %ld", fst.st_size);
fail("(via fstat): file size changed to %lld",
(long long)fst.st_size);
goto failed;
}
fst.st_size = lseek(fd[0], 0, SEEK_END);
if (fst.st_size != fsize) {
fail("(via lseek): file size changed to %ld", fst.st_size);
fail("(via lseek): file size changed to %lld",
(long long)fst.st_size);
goto failed;
}
......
......@@ -44,7 +44,8 @@ int main(int argc, char ** argv)
}
if (fst.st_size != 0) {
pr_perror("%s file size eq %ld", filename, fst.st_size);
pr_perror("%s file size eq %lld", filename,
(long long)fst.st_size);
goto failed;
}
......@@ -84,13 +85,15 @@ int main(int argc, char ** argv)
}
if (fst2.st_size != fsize) {
fail("(via fstat): file size changed to %ld", fst.st_size);
fail("(via fstat): file size changed to %lld",
(long long)fst.st_size);
goto failed;
}
fst2.st_size = lseek(fd, 0, SEEK_END);
if (fst2.st_size != fsize) {
fail("(via lseek): file size changed to %ld", fst.st_size);
fail("(via lseek): file size changed to %lld",
(long long)fst.st_size);
goto failed;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment