From owner-freebsd-bugs Fri Aug 23 6:50:14 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AEFC337B401 for ; Fri, 23 Aug 2002 06:50:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8854243E75 for ; Fri, 23 Aug 2002 06:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7NDo2JU062507 for ; Fri, 23 Aug 2002 06:50:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7NDo2g4062506; Fri, 23 Aug 2002 06:50:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B867037B400 for ; Fri, 23 Aug 2002 06:40:58 -0700 (PDT) Received: from pcle2.cc.univie.ac.at (pcle2.cc.univie.ac.at [131.130.2.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B94143E84 for ; Fri, 23 Aug 2002 06:40:57 -0700 (PDT) (envelope-from le@univie.ac.at) Received: from pcle2.cc.univie.ac.at (localhost [127.0.0.1]) by pcle2.cc.univie.ac.at (8.12.5/8.12.5) with ESMTP id g7NDetWN003423 for ; Fri, 23 Aug 2002 15:40:55 +0200 (CEST) (envelope-from le@pcle2.cc.univie.ac.at) Received: (from le@localhost) by pcle2.cc.univie.ac.at (8.12.5/8.12.5/Submit) id g7NDetZQ003422; Fri, 23 Aug 2002 15:40:55 +0200 (CEST) Message-Id: <200208231340.g7NDetZQ003422@pcle2.cc.univie.ac.at> Date: Fri, 23 Aug 2002 15:40:55 +0200 (CEST) From: Lukas Ertl Reply-To: Lukas Ertl To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/41936: [PATCH] edquota units are shown as blocks, but are kbytes Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 41936 >Category: bin >Synopsis: [PATCH] edquota units are shown as blocks, but are kbytes >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 23 06:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Lukas Ertl >Release: FreeBSD 4.6-STABLE i386 >Organization: Vienna University Computer Center >Environment: System: FreeBSD pcle2.cc.univie.ac.at 4.6-STABLE FreeBSD 4.6-STABLE #0: Mon Aug 19 19:18:42 CEST 2002 le@pcle2.cc.univie.ac.at:/usr/obj/usr/src/sys/PCLE2 i386 >Description: The units shown in /usr/sbin/edquota ("blocks in use", "soft limit", "hard limit") are called "blocks" but really are kbytes, which is quite confusing. >How-To-Repeat: configure a filesystem with quotas, run "edquota ". >Fix: --- edquota.diff begins here --- --- edquota.c Fri Aug 23 15:24:45 2002 +++ edquota.c.new Fri Aug 23 15:28:20 2002 @@ -423,7 +423,7 @@ fprintf(fd, "Quotas for %s %s:\n", qfextension[quotatype], name); for (qup = quplist; qup; qup = qup->next) { fprintf(fd, "%s: %s %lu, limits (soft = %lu, hard = %lu)\n", - qup->fsname, "blocks in use:", + qup->fsname, "kbytes in use:", (unsigned long)(dbtob(qup->dqblk.dqb_curblocks) / 1024), (unsigned long)(dbtob(qup->dqblk.dqb_bsoftlimit) / 1024), (unsigned long)(dbtob(qup->dqblk.dqb_bhardlimit) / 1024)); @@ -474,7 +474,7 @@ return (0); } cnt = sscanf(cp, - " blocks in use: %lu, limits (soft = %lu, hard = %lu)", + " kbytes in use: %lu, limits (soft = %lu, hard = %lu)", &curblocks, &bsoftlimit, &bhardlimit); if (cnt != 3) { warnx("%s:%s: bad format", fsp, cp); --- edquota.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message