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 all the possible fileops here, and if ther...
details: https://anonhg.NetBSD.org/src/rev/2f8044496e2f
branches: trunk
changeset: 769445:2f8044496e2f
user: christos <christos%NetBSD.org@localhost>
date: Sat Sep 10 18:34:40 2011 +0000
description:
add all the possible fileops here, and if there is one we know about
print that instead of the passed name.
diffstat:
usr.bin/fstat/misc.c | 51 ++++++++++++++++++++++++++++++++++++---------------
1 files changed, 36 insertions(+), 15 deletions(-)
diffs (85 lines):
diff -r 07c1c863540b -r 2f8044496e2f usr.bin/fstat/misc.c
--- a/usr.bin/fstat/misc.c Sat Sep 10 17:02:46 2011 +0000
+++ b/usr.bin/fstat/misc.c Sat Sep 10 18:34:40 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.7 2009/07/13 21:44:32 christos Exp $ */
+/* $NetBSD: misc.c,v 1.8 2011/09/10 18:34:40 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: misc.c,v 1.7 2009/07/13 21:44:32 christos Exp $");
+__RCSID("$NetBSD: misc.c,v 1.8 2011/09/10 18:34:40 christos Exp $");
#define _KMEMUSER
#include <stdbool.h>
@@ -59,23 +59,41 @@
#include "fstat.h"
static struct nlist nl[] = {
-#define NL_KQUEUE 0
+#define NL_BPF 0
+ { .n_name = "bpf_fileops", },
+#define NL_CRYPTO 1
+ { .n_name = "cryptofops" },
+#define NL_DMIO 2
+ { .n_name = "dmio_fileops", },
+#define NL_DRVCTL 3
+ { .n_name = "drvctl_fileops", },
+#define NL_DTV_DEMUX 4
+ { .n_name = "dtv_demux_fileops", },
+#define NL_FILEMON 5
+ { .n_name = "filemon_fileops", },
+#define NL_KQUEUE 6
{ .n_name = "kqueueops" },
-#define NL_MQUEUE 1
+#define NL_MQUEUE 7
{ .n_name = "mqops" },
-#define NL_PIPE 2
+#define NL_PIPE 8
{ .n_name = "pipeops" },
-#define NL_SOCKET 3
+#define NL_PUTTER 9
+ { .n_name = "putter_fileops", },
+#define NL_SEM 10
+ { .n_name = "semops", },
+#define NL_SOCKET 11
{ .n_name = "socketops" },
-#define NL_VNOPS 4
+#define NL_SVR4_NET 12
+ { .n_name = "svr4_netops" },
+#define NL_SVR4_32_NET 13
+ { .n_name = "svr4_32_netops" },
+#define NL_TAP 14
+ { .n_name = "tap_fileops", },
+#define NL_VNOPS 15
{ .n_name = "vnops" },
-#define NL_CRYPTO 5
- { .n_name = "cryptofops" },
-#define NL_BPF 6
- { .n_name = "bpf_fileops", },
-#define NL_TAP 7
- { .n_name = "tap_fileops", },
-#define NL_MAX 8
+#define NL_XENEVT 16
+ { .n_name = "xenevt_fileops" },
+#define NL_MAX 17
{ .n_name = NULL }
};
@@ -166,8 +184,11 @@
case NL_CRYPTO:
printf("* crypto %p\n", f->f_data);
return 0;
+ case NL_MAX:
+ printf("* %s %p\n", name, f->f_data);
+ return 0;
default:
- printf("* %s %p\n", name, f->f_data);
+ printf("* %s %p\n", nl[i].n_name, f->f_data);
return 0;
}
}
Home |
Main Index |
Thread Index |
Old Index