Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/fstat for (new)pipes, print 'n' if it's in nonblocki...



details:   https://anonhg.NetBSD.org/src/rev/35125f2dab41
branches:  trunk
changeset: 518158:35125f2dab41
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Nov 25 18:49:02 2001 +0000

description:
for (new)pipes, print 'n' if it's in nonblocking mode, and 'a' if it's
set to async

diffstat:

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

diffs (33 lines):

diff -r 711c23883f7f -r 35125f2dab41 usr.bin/fstat/fstat.c
--- a/usr.bin/fstat/fstat.c     Sun Nov 25 18:40:34 2001 +0000
+++ b/usr.bin/fstat/fstat.c     Sun Nov 25 18:49:02 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstat.c,v 1.53 2001/10/26 05:56:11 lukem Exp $ */
+/*     $NetBSD: fstat.c,v 1.54 2001/11/25 18:49:02 jdolecek 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.53 2001/10/26 05:56:11 lukem Exp $");
+__RCSID("$NetBSD: fstat.c,v 1.54 2001/11/25 18:49:02 jdolecek Exp $");
 #endif
 #endif /* not lint */
 
@@ -937,10 +937,12 @@
        }
 
        /* pipe descriptor is either read or write, never both */
-       printf("* pipe %p %s %p %c", cpipe,
+       printf("* pipe %p %s %p %s%s%s", cpipe,
                (fp->f_flag & FWRITE) ? "->" : "<-",
                cp.pipe_peer,
-               (fp->f_flag & FWRITE) ? 'w' : 'r');
+               (fp->f_flag & FWRITE) ? "w" : "r",
+               (fp->f_flag & FNONBLOCK) ? "n" : "",
+               (cp.pipe_state & PIPE_ASYNC) ? "a" : "");
        printf("\n");
        return;
 bad:



Home | Main Index | Thread Index | Old Index