Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dm Add a sanity check for missing functions in dmt
details: https://anonhg.NetBSD.org/src/rev/fb504cd1b1f0
branches: trunk
changeset: 768796:fb504cd1b1f0
user: ahoka <ahoka%NetBSD.org@localhost>
date: Sat Aug 27 17:06:08 2011 +0000
description:
Add a sanity check for missing functions in dmt
diffstat:
sys/dev/dm/dm_target.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r c656258deb59 -r fb504cd1b1f0 sys/dev/dm/dm_target.c
--- a/sys/dev/dm/dm_target.c Sat Aug 27 17:05:57 2011 +0000
+++ b/sys/dev/dm/dm_target.c Sat Aug 27 17:06:08 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_target.c,v 1.15 2010/12/23 14:58:13 mlelstv Exp $ */
+/* $NetBSD: dm_target.c,v 1.16 2011/08/27 17:06:08 ahoka Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -150,6 +150,16 @@
{
dm_target_t *dmt;
+ /* Sanity check for any missing function */
+ KASSERT(dmt->init != NULL);
+ KASSERT(dmt->status != NULL);
+ KASSERT(dmt->strategy != NULL);
+ KASSERT(dmt->deps != NULL);
+ KASSERT(dmt->destroy != NULL);
+ KASSERT(dmt->upcall != NULL);
+ KASSERT(dmt->sync != NULL);
+ KASSERT(dmt->secsize != NULL);
+
mutex_enter(&dm_target_mutex);
dmt = dm_target_lookup_name(dm_target->name);
Home |
Main Index |
Thread Index |
Old Index