From 028edcc4436d04078d53dc9b33683d9096edac93 Mon Sep 17 00:00:00 2001 From: ahoka Date: Sun, 28 Aug 2011 07:22:48 +0000 Subject: readd assertions noew with the correct struct im wondering why the module cflags didnt warn about this obvious typo --- sys/dev/dm/dm_target.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys/dev/dm/dm_target.c') 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); -- cgit