svn commit: r188434 - projects/quota64/lib/libutil
Kirk McKusick
mckusick at FreeBSD.org
Tue Feb 10 00:11:46 PST 2009
Author: mckusick
Date: Tue Feb 10 08:11:44 2009
New Revision: 188434
URL: http://svn.freebsd.org/changeset/base/188434
Log:
Bug fixes found from using these functions in edquota.
Modified:
projects/quota64/lib/libutil/quotafile.3
projects/quota64/lib/libutil/quotafile.c
Modified: projects/quota64/lib/libutil/quotafile.3
==============================================================================
--- projects/quota64/lib/libutil/quotafile.3 Tue Feb 10 08:10:57 2009 (r188433)
+++ projects/quota64/lib/libutil/quotafile.3 Tue Feb 10 08:11:44 2009 (r188434)
@@ -45,9 +45,9 @@
.Ft "struct quotafile *"
.Fn quota_create "const char *path"
.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
-.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
.Fn quota_close "struct quotafile *qf"
.Sh DESCRIPTION
Modified: projects/quota64/lib/libutil/quotafile.c
==============================================================================
--- projects/quota64/lib/libutil/quotafile.c Tue Feb 10 08:10:57 2009 (r188433)
+++ projects/quota64/lib/libutil/quotafile.c Tue Feb 10 08:11:44 2009 (r188434)
@@ -231,7 +231,7 @@ quota_write32(struct quotafile *qf, cons
off = id * sizeof(struct dqblk32);
if (lseek(qf->fd, off, SEEK_SET) == -1)
return (-1);
- return (write(qf->fd, &dqb32, sizeof(dqb32)));
+ return (write(qf->fd, &dqb32, sizeof(dqb32)) == -1);
}
static int
@@ -252,7 +252,7 @@ quota_write64(struct quotafile *qf, cons
off = sizeof(struct dqhdr64) + id * sizeof(struct dqblk64);
if (lseek(qf->fd, off, SEEK_SET) == -1)
return (-1);
- return (write(qf->fd, &dqb64, sizeof(dqb64)));
+ return (write(qf->fd, &dqb64, sizeof(dqb64)) == -1);
}
int
More information about the svn-src-projects
mailing list