From 37675524540b859350fd958484929e6fbd13574e Mon Sep 17 00:00:00 2001 From: Mike Pritchard Date: Tue, 23 Jan 2007 02:13:00 +0000 Subject: [PATCH] Use fseeko to seek in the file, instead of fseek to prevent seek errors for extremely large uids (e.g. in the billions range). --- sbin/quotacheck/quotacheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c index e4c7c61525a3..deaacae7cba3 100644 --- a/sbin/quotacheck/quotacheck.c +++ b/sbin/quotacheck/quotacheck.c @@ -498,7 +498,7 @@ update(fsname, quotafile, type) dqbuf.dqb_itime = 0; dqbuf.dqb_curinodes = fup->fu_curinodes; dqbuf.dqb_curblocks = fup->fu_curblocks; - if (fseek(qfo, offset, SEEK_SET) < 0) { + if (fseeko(qfo, offset, SEEK_SET) < 0) { warn("%s: seek failed", quotafile); return(1); } @@ -528,7 +528,7 @@ update(fsname, quotafile, type) dqbuf.dqb_curinodes = fup->fu_curinodes; dqbuf.dqb_curblocks = fup->fu_curblocks; offset = (off_t)fup->fu_id * sizeof(struct dqblk); - if (fseek(qfo, offset, SEEK_SET) < 0) { + if (fseeko(qfo, offset, SEEK_SET) < 0) { warn("%s: seek failed", quotafile); return(1); }