Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ufs Add diagnostic check to ufs_vinit in order to ca...



details:   https://anonhg.NetBSD.org/src/rev/53c022fa449a
branches:  trunk
changeset: 545550:53c022fa449a
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Thu Apr 10 20:22:04 2003 +0000

description:
Add diagnostic check to ufs_vinit in order to catch bad mode fields in
inodes early.

diffstat:

 sys/ufs/ufs/ufs_vnops.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r c82be9d93b55 -r 53c022fa449a sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c   Thu Apr 10 20:03:40 2003 +0000
+++ b/sys/ufs/ufs/ufs_vnops.c   Thu Apr 10 20:22:04 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_vnops.c,v 1.93 2003/04/04 13:39:58 drochner Exp $  */
+/*     $NetBSD: ufs_vnops.c,v 1.94 2003/04/10 20:22:04 fvdl Exp $      */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993, 1995
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.93 2003/04/04 13:39:58 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.94 2003/04/10 20:22:04 fvdl Exp $");
 
 #ifndef _LKM
 #include "opt_quota.h"
@@ -2040,6 +2040,11 @@
        case VDIR:
        case VREG:
                break;
+#ifdef DIAGNOSTIC
+       default:
+               panic("ufs_vinit: ino %d: bad mode %x", ip->i_number,
+                   ip->i_mode);
+#endif
        }
        if (ip->i_number == ROOTINO)
                 vp->v_flag |= VROOT;



Home | Main Index | Thread Index | Old Index