summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_target.c
diff options
context:
space:
mode:
authorahoka <ahoka@NetBSD.org>2011-08-28 07:22:48 +0000
committerahoka <ahoka@NetBSD.org>2011-08-28 07:22:48 +0000
commit028edcc4436d04078d53dc9b33683d9096edac93 (patch)
tree2a3a16d2f2b4f59866d943cbf7f48e0f234a7e67 /sys/dev/dm/dm_target.c
parent0495dc918a5f394d91d6d753ff19738a7508d144 (diff)
readd assertions noew with the correct struct
im wondering why the module cflags didnt warn about this obvious typo
Diffstat (limited to 'sys/dev/dm/dm_target.c')
-rw-r--r--sys/dev/dm/dm_target.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/dm/dm_target.c b/sys/dev/dm/dm_target.c
index 609b0256982..ec78c828f80 100644
--- a/sys/dev/dm/dm_target.c
+++ b/sys/dev/dm/dm_target.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_target.c,v 1.17 2011/08/27 23:31:12 joerg Exp $ */
+/* $NetBSD: dm_target.c,v 1.18 2011/08/28 07:22:48 ahoka Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -150,6 +150,16 @@ dm_target_insert(dm_target_t * dm_target)
{
dm_target_t *dmt;
+ /* Sanity check for any missing function */
+ KASSERT(dm_target->init != NULL);
+ KASSERT(dm_target->status != NULL);
+ KASSERT(dm_target->strategy != NULL);
+ KASSERT(dm_target->deps != NULL);
+ KASSERT(dm_target->destroy != NULL);
+ KASSERT(dm_target->upcall != NULL);
+ KASSERT(dm_target->sync != NULL);
+ KASSERT(dm_target->secsize != NULL);
+
mutex_enter(&dm_target_mutex);
dmt = dm_target_lookup_name(dm_target->name);