mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
Bug fixes found from using these functions in edquota.
This commit is contained in:
parent
cdab8b664d
commit
581fce8e7d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/quota64/; revision=188434
|
@ -45,9 +45,9 @@
|
||||||
.Ft "struct quotafile *"
|
.Ft "struct quotafile *"
|
||||||
.Fn quota_create "const char *path"
|
.Fn quota_create "const char *path"
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn quota_read "struct quotafile *qf" "struct dqblk *dqb" "int type"
|
.Fn quota_read "struct quotafile *qf" "struct dqblk *dqb" "int id"
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn quota_write "struct quotafile *qf" "const struct dqblk *dqb" "int type"
|
.Fn quota_write "struct quotafile *qf" "const struct dqblk *dqb" "int id"
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn quota_close "struct quotafile *qf"
|
.Fn quota_close "struct quotafile *qf"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
|
|
|
@ -231,7 +231,7 @@ quota_write32(struct quotafile *qf, const struct dqblk *dqb, int id)
|
||||||
off = id * sizeof(struct dqblk32);
|
off = id * sizeof(struct dqblk32);
|
||||||
if (lseek(qf->fd, off, SEEK_SET) == -1)
|
if (lseek(qf->fd, off, SEEK_SET) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
return (write(qf->fd, &dqb32, sizeof(dqb32)));
|
return (write(qf->fd, &dqb32, sizeof(dqb32)) == -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -252,7 +252,7 @@ quota_write64(struct quotafile *qf, const struct dqblk *dqb, int id)
|
||||||
off = sizeof(struct dqhdr64) + id * sizeof(struct dqblk64);
|
off = sizeof(struct dqhdr64) + id * sizeof(struct dqblk64);
|
||||||
if (lseek(qf->fd, off, SEEK_SET) == -1)
|
if (lseek(qf->fd, off, SEEK_SET) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
return (write(qf->fd, &dqb64, sizeof(dqb64)));
|
return (write(qf->fd, &dqb64, sizeof(dqb64)) == -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in a new issue