From owner-freebsd-bugs Tue Nov 24 23:29:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA05505 for freebsd-bugs-outgoing; Tue, 24 Nov 1998 23:29:24 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA05493 for ; Tue, 24 Nov 1998 23:29:23 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id XAA28261; Tue, 24 Nov 1998 23:30:01 -0800 (PST) Date: Tue, 24 Nov 1998 23:30:01 -0800 (PST) Message-Id: <199811250730.XAA28261@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Andre Albsmeier Subject: Re: bin/8730: repquota output needs new formatting (diffs included) Reply-To: Andre Albsmeier Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/8730; it has been noted by GNATS. From: Andre Albsmeier To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: bin/8730: repquota output needs new formatting (diffs included) Date: Wed, 25 Nov 1998 08:19:40 +0100 The following patch is much better. It assures that the output remains easily parseable by shell scripts even if the formatting overflows. Thanks to Joseph Koshy for pointing me to this! --- repquota.c.ORI Mon Mar 9 20:07:46 1998 +++ repquota.c Wed Nov 25 08:07:24 1998 @@ -216,8 +216,8 @@ fup->fu_dqblk = dqbuf; } fclose(qf); - printf(" Block limits File limits\n"); - printf("User used soft hard grace used soft hard grace\n"); + printf(" Block limits File limits\n"); + printf("User used soft hard grace used soft hard grace\n"); for (id = 0; id <= highid[type]; id++) { fup = lookup(id, type); if (fup == 0) @@ -226,7 +226,7 @@ fup->fu_dqblk.dqb_curblocks == 0) continue; printf("%-10s", fup->fu_name); - printf("%c%c%8lu%8lu%8lu%7s", + printf("%c%c %8lu %8lu %8lu %6s", fup->fu_dqblk.dqb_bsoftlimit && fup->fu_dqblk.dqb_curblocks >= fup->fu_dqblk.dqb_bsoftlimit ? '+' : '-', @@ -240,7 +240,7 @@ fup->fu_dqblk.dqb_curblocks >= fup->fu_dqblk.dqb_bsoftlimit ? timeprt(fup->fu_dqblk.dqb_btime) : ""); - printf(" %6lu%6lu%6lu%7s\n", + printf(" %7lu %7lu %7lu %6s\n", fup->fu_dqblk.dqb_curinodes, fup->fu_dqblk.dqb_isoftlimit, fup->fu_dqblk.dqb_ihardlimit, To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message