From owner-freebsd-bugs Tue Nov 17 07:20:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA23646 for freebsd-bugs-outgoing; Tue, 17 Nov 1998 07:20:03 -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 HAA23470 for ; Tue, 17 Nov 1998 07:19:57 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA14680; Tue, 17 Nov 1998 07:20:01 -0800 (PST) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA23211 for ; Tue, 17 Nov 1998 07:14:21 -0800 (PST) (envelope-from andre.albsmeier@mchp.siemens.de) Received: from mail.siemens.de (salomon.siemens.de [139.23.33.13]) by david.siemens.de (8.9.1a/8.9.1) with ESMTP id QAA09882 for ; Tue, 17 Nov 1998 16:13:40 +0100 (MET) Received: from curry.mchp.siemens.de (daemon@curry.mchp.siemens.de [146.180.31.23]) by mail.siemens.de (8.9.1a/8.9.1) with ESMTP id QAA14298 for ; Tue, 17 Nov 1998 16:13:42 +0100 (MET) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.8.8/8.8.8) id QAA03648 for ; Tue, 17 Nov 1998 16:13:41 +0100 (CET) Message-Id: <199811171513.QAA14761@internal> Date: Tue, 17 Nov 1998 16:13:38 +0100 (CET) From: Andre Albsmeier To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/8730: repquota output needs new formatting (diffs included) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 8730 >Category: bin >Synopsis: repquota output needs new formatting (diffs included) >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: Tue Nov 17 07:20:01 PST 1998 >Last-Modified: >Originator: Andre Albsmeier >Organization: >Release: FreeBSD 2.2.7-STABLE i386 >Environment: FreeBSD 2.2.7-STABLE with quotas enabled >Description: The output of repquota is screwed up if a user may have more that 99999 files: root@server:~>repquota -a Block limits File limits User used soft hard grace used soft hard grace riek -- 258559 400000 1200000 13928 40000120000 ... Here the hard limits are 120000 files. This output is difficult to get parsed by shell scripts, for example. Since big hard disks get cheaper every day, I would suggest changing the output format a little for both, block and file data. >How-To-Repeat: Set the quotas as shown above. >Fix: --- usr.sbin/repquota/repquota.c.ORI Tue Nov 17 15:53:51 1998 +++ usr.sbin/repquota/repquota.c Tue Nov 17 15:59:29 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%9lu%9lu%9lu%7s", 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%7s\n", fup->fu_dqblk.dqb_curinodes, fup->fu_dqblk.dqb_isoftlimit, fup->fu_dqblk.dqb_ihardlimit, >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message