lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 13 Aug 2017 15:20:40 -0400 From: Theodore Ts'o <tytso@....edu> To: Ext4 Developers List <linux-ext4@...r.kernel.org> Cc: Theodore Ts'o <tytso@....edu> Subject: [PATCH] libsupport: fix 32-bit quota test failures On 32-bit platform some of the util_dqblk structures have a type of long long. So we need to use %lld and casts to make sure the right thing happens on both 32-bit and 64-bit platforms. Signed-off-by: Theodore Ts'o <tytso@....edu> --- lib/support/mkquota.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/support/mkquota.c b/lib/support/mkquota.c index 00f3a406e..931a839dd 100644 --- a/lib/support/mkquota.c +++ b/lib/support/mkquota.c @@ -50,11 +50,13 @@ static void print_dquot(const char *desc, struct dquot *dq) { if (desc) fprintf(stderr, "%s: ", desc); - fprintf(stderr, "%u %ld:%ld:%ld %ld:%ld:%ld\n", - dq->dq_id, dq->dq_dqb.dqb_curspace, - dq->dq_dqb.dqb_bsoftlimit, dq->dq_dqb.dqb_bhardlimit, - dq->dq_dqb.dqb_curinodes, - dq->dq_dqb.dqb_isoftlimit, dq->dq_dqb.dqb_ihardlimit); + fprintf(stderr, "%u %lld:%lld:%lld %lld:%lld:%lld\n", + dq->dq_id, (long long) dq->dq_dqb.dqb_curspace, + (long long) dq->dq_dqb.dqb_bsoftlimit, + (long long) dq->dq_dqb.dqb_bhardlimit, + (long long) dq->dq_dqb.dqb_curinodes, + (long long) dq->dq_dqb.dqb_isoftlimit, + (long long) dq->dq_dqb.dqb_ihardlimit); } #else static void print_dquot(const char *desc EXT2FS_ATTR((unused)), @@ -524,11 +526,11 @@ static int scan_dquots_callback(struct dquot *dquot, void *cb_data) dq->dq_dqb.dqb_curinodes != dquot->dq_dqb.dqb_curinodes) { scan_data->usage_is_inconsistent = 1; fprintf(stderr, "[QUOTA WARNING] Usage inconsistent for ID %u:" - "actual (%ld, %ld) != expected (%ld, %ld)\n", - dq->dq_id, dq->dq_dqb.dqb_curspace, - dq->dq_dqb.dqb_curinodes, - dquot->dq_dqb.dqb_curspace, - dquot->dq_dqb.dqb_curinodes); + "actual (%lld, %lld) != expected (%lld, %lld)\n", + dq->dq_id, (long long) dq->dq_dqb.dqb_curspace, + (long long) dq->dq_dqb.dqb_curinodes, + (long long) dquot->dq_dqb.dqb_curspace, + (long long) dquot->dq_dqb.dqb_curinodes); } if (scan_data->update_limits) { -- 2.11.0.rc0.7.gbe5a750
Powered by blists - more mailing lists