Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/fstat Add an extra column for inode numbers, and pul...



details:   https://anonhg.NetBSD.org/src/rev/b805dba22868
branches:  trunk
changeset: 522185:b805dba22868
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Feb 12 03:28:20 2002 +0000

description:
Add an extra column for inode numbers, and pull back the mode field to
just 5 columns if in "numeric" mode.  Other fields should dynamically
resize, but not today...

diffstat:

 usr.bin/fstat/fstat.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r 30289cb690d2 -r b805dba22868 usr.bin/fstat/fstat.c
--- a/usr.bin/fstat/fstat.c     Tue Feb 12 02:27:59 2002 +0000
+++ b/usr.bin/fstat/fstat.c     Tue Feb 12 03:28:20 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstat.c,v 1.54 2001/11/25 18:49:02 jdolecek Exp $      */
+/*     $NetBSD: fstat.c,v 1.55 2002/02/12 03:28:20 simonb Exp $        */
 
 /*-
  * Copyright (c) 1988, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)fstat.c    8.3 (Berkeley) 5/2/95";
 #else
-__RCSID("$NetBSD: fstat.c,v 1.54 2001/11/25 18:49:02 jdolecek Exp $");
+__RCSID("$NetBSD: fstat.c,v 1.55 2002/02/12 03:28:20 simonb Exp $");
 #endif
 #endif /* not lint */
 
@@ -267,10 +267,10 @@
        }
        if (nflg)
                printf("%s",
-"USER     CMD          PID   FD  DEV    INUM       MODE SZ|DV R/W");
+"USER     CMD          PID   FD  DEV     INUM  MODE  SZ|DV R/W");
        else
                printf("%s",
-"USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W");
+"USER     CMD          PID   FD MOUNT       INUM MODE         SZ|DV R/W");
        if (checkfile && fsflg == 0)
                printf(" NAME\n");
        else
@@ -509,7 +509,7 @@
                (void)snprintf(mode, sizeof mode, "%o", fst.mode);
        else
                strmode(fst.mode, mode);
-       (void)printf(" %6ld %10s", (long)fst.fileid, mode);
+       (void)printf(" %7ld %*s", (long)fst.fileid, nflg ? 5 : 10, mode);
        switch (vn.v_type) {
        case VBLK:
        case VCHR: {



Home | Main Index | Thread Index | Old Index