From owner-svn-src-projects@FreeBSD.ORG Tue Feb 10 08:11:44 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F47F106586E; Tue, 10 Feb 2009 08:11:44 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CA078FC26; Tue, 10 Feb 2009 08:11:44 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1A8Biwh085660; Tue, 10 Feb 2009 08:11:44 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1A8Bigw085658; Tue, 10 Feb 2009 08:11:44 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <200902100811.n1A8Bigw085658@svn.freebsd.org> From: Kirk McKusick Date: Tue, 10 Feb 2009 08:11:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188434 - projects/quota64/lib/libutil X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 08:11:46 -0000 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