Date: Thu, 19 Oct 2006 15:25:48 GMT From: Michael Hanselmann<freebsd@hansmi.ch> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/104573: quota program fails to seperate columns when using large limits Message-ID: <200610191525.k9JFPmhL044471@www.freebsd.org> Resent-Message-ID: <200610191530.k9JFUFiX051644@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 104573 >Category: misc >Synopsis: quota program fails to seperate columns when using large limits >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 19 15:30:15 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Michael Hanselmann >Release: 5.3-RELEASE-p4, 4.11-RELEASE-p25 >Organization: >Environment: FreeBSD host.domain.tld 5.3-RELEASE-p4 FreeBSD 5.3-RELEASE-p4 #0: Fri Jan 7 14:36:44 CET 2005 root@host.domain.tld:/usr/obj/usr/src/sys/GENERIC i386 >Description: When using large limits for quotas, for example 20 GB, /usr/bin/quota joins the columns: Disk quotas for user testhost (uid 2000): Filesystem usage quota limit grace files quota limit grace /home 1710 2097152020971520 163 0 0 >How-To-Repeat: Set 20 GB as quota, show it using /usr/bin/quota >Fix: Use mandatory spaces between columns, see attached patch. Patch attached with submission follows: ? quota ? quota.1.gz Index: quota.c =================================================================== RCS file: /home/ncvs/src/usr.bin/quota/quota.c,v retrieving revision 1.24 diff -u -r1.24 quota.c --- quota.c 13 Mar 2005 17:58:31 -0000 1.24 +++ quota.c 19 Oct 2006 15:23:43 -0000 @@ -310,7 +310,7 @@ printf("%s\n", qup->fsname); nam = ""; } - printf("%15s%8lu%c%7lu%8lu%8s" + printf("%12s %7lu %c %7lu %7lu %7s" , nam , (u_long) (dbtob(qup->dqblk.dqb_curblocks) / 1024) @@ -321,7 +321,7 @@ / 1024) , (msgb == (char *)0) ? "" :timeprt(qup->dqblk.dqb_btime)); - printf("%8lu%c%7lu%8lu%8s\n" + printf("%7lu %c %7lu %7lu %7s\n" , (u_long)qup->dqblk.dqb_curinodes , (msgi == (char *)0) ? ' ' : '*' , (u_long)qup->dqblk.dqb_isoftlimit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610191525.k9JFPmhL044471>