Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/kernfs If msgbuf is not enabled, do not report th...
details: https://anonhg.NetBSD.org/src/rev/7d2761f9ae8d
branches: trunk
changeset: 753500:7d2761f9ae8d
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Mar 31 01:27:05 2010 +0000
description:
If msgbuf is not enabled, do not report the node in readdir. That
way ls -l won't report funny errors because getattr for a readdir
result fails.
XXX: lookup for msgbuf still succeeds even if not enabled
diffstat:
sys/miscfs/kernfs/kernfs_vnops.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r d131be3193a4 -r 7d2761f9ae8d sys/miscfs/kernfs/kernfs_vnops.c
--- a/sys/miscfs/kernfs/kernfs_vnops.c Wed Mar 31 00:00:33 2010 +0000
+++ b/sys/miscfs/kernfs/kernfs_vnops.c Wed Mar 31 01:27:05 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernfs_vnops.c,v 1.140 2010/01/22 22:46:00 njoly Exp $ */
+/* $NetBSD: kernfs_vnops.c,v 1.141 2010/03/31 01:27:05 pooka Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.140 2010/01/22 22:46:00 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.141 2010/03/31 01:27:05 pooka Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -1169,6 +1169,12 @@
!vfinddev(*dp, kt->kt_vtype, &fvp))
continue;
}
+ if (kt->kt_tag == KFSmsgbuf) {
+ if (!msgbufenabled
+ || msgbufp->msg_magic != MSG_MAGIC) {
+ continue;
+ }
+ }
d.d_namlen = kt->kt_namlen;
if ((error = kernfs_setdirentfileno(&d, i, kfs,
&kern_targets[0], kt, ap)) != 0)
Home |
Main Index |
Thread Index |
Old Index