Use fseeko to seek in the file, instead of fseek to prevent seek

errors for extremely large uids (e.g. in the billions range).
This commit is contained in:
Mike Pritchard 2007-01-23 02:13:00 +00:00
parent b32c2af199
commit 3767552454
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166180

View file

@ -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);
}