Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/fstat merge rev. 1.50.2.1 (made by lukem):



details:   https://anonhg.NetBSD.org/src/rev/37cf50274d6c
branches:  trunk
changeset: 538636:37cf50274d6c
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Oct 23 22:37:11 2002 +0000

description:
merge rev. 1.50.2.1 (made by lukem):
rudimentary support for for displaying DTYPE_KQUEUE fds

diffstat:

 usr.bin/fstat/fstat.c |  20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diffs (55 lines):

diff -r 57fd06e16eb2 -r 37cf50274d6c usr.bin/fstat/fstat.c
--- a/usr.bin/fstat/fstat.c     Wed Oct 23 21:41:34 2002 +0000
+++ b/usr.bin/fstat/fstat.c     Wed Oct 23 22:37:11 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstat.c,v 1.55 2002/02/12 03:28:20 simonb Exp $        */
+/*     $NetBSD: fstat.c,v 1.56 2002/10/23 22:37:11 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.55 2002/02/12 03:28:20 simonb Exp $");
+__RCSID("$NetBSD: fstat.c,v 1.56 2002/10/23 22:37:11 jdolecek Exp $");
 #endif
 #endif /* not lint */
 
@@ -161,6 +161,7 @@
 static const char *inet6_addrstr __P((struct in6_addr *));
 #endif
 void   socktrans __P((struct socket *, int));
+void   kqueuetrans __P((void *, int));
 int    ufs_filestat __P((struct vnode *, struct filestat *));
 void   usage __P((void));
 char   *vfilestat __P((struct vnode *, struct filestat *));
@@ -399,6 +400,10 @@
                if (checkfile == 0)
                        ptrans(&file, (struct pipe *)file.f_data, i);
                break;
+       case DTYPE_KQUEUE:
+               if (checkfile == 0)
+                       kqueuetrans((void *)file.f_data, i);
+               break;
        default:
                dprintf("unknown file type %d for file %d of pid %d",
                    file.f_type, i, Pid);
@@ -949,6 +954,17 @@
        printf("* error\n");
 }
 
+void
+kqueuetrans(kq, i)
+       void *kq;
+       int i;
+{
+
+       PREFIX(i);
+       printf("* kqueue %lx", (long)kq);
+       printf("\n");
+}
+
 /*
  * getinetproto --
  *     print name of protocol number



Home | Main Index | Thread Index | Old Index