Source-Changes-HG archive

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

[src/netbsd-1-5]: src/usr.bin/fstat Pull up revision 1.55 (requested by simonb):



details:   https://anonhg.NetBSD.org/src/rev/c5eb9eca8ebd
branches:  netbsd-1-5
changeset: 492769:c5eb9eca8ebd
user:      he <he%NetBSD.org@localhost>
date:      Wed Feb 13 23:28:22 2002 +0000

description:
Pull up revision 1.55 (requested by simonb):
  Add an extra column for inode numbers, and pull back the mode field
  to just 5 columns if in "numeric" mode.

diffstat:

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

diffs (40 lines):

diff -r 73509339defd -r c5eb9eca8ebd usr.bin/fstat/fstat.c
--- a/usr.bin/fstat/fstat.c     Wed Feb 13 23:12:10 2002 +0000
+++ b/usr.bin/fstat/fstat.c     Wed Feb 13 23:28:22 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstat.c,v 1.42.4.1 2000/10/02 03:11:37 enami Exp $     */
+/*     $NetBSD: fstat.c,v 1.42.4.2 2002/02/13 23:28:22 he 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.42.4.1 2000/10/02 03:11:37 enami Exp $");
+__RCSID("$NetBSD: fstat.c,v 1.42.4.2 2002/02/13 23:28:22 he Exp $");
 #endif
 #endif /* not lint */
 
@@ -268,10 +268,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
@@ -502,7 +502,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