summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/dm/dm_ioctl.c')
-rw-r--r--sys/dev/dm/dm_ioctl.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/dev/dm/dm_ioctl.c b/sys/dev/dm/dm_ioctl.c
index 9dc84fe6fc3..03f1a91f6bd 100644
--- a/sys/dev/dm/dm_ioctl.c
+++ b/sys/dev/dm/dm_ioctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_ioctl.c,v 1.11 2009/04/13 18:51:54 haad Exp $ */
+/* $NetBSD: dm_ioctl.c,v 1.12 2009/06/05 19:56:40 haad Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -680,21 +680,18 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
prop_object_iterator_t iter;
prop_array_t cmd_array;
- prop_dictionary_t target_dict;
+ prop_dictionary_t target_dict, param_dict;
const char *name, *uuid, *type;
uint32_t flags, ret, minor;
- char *str;
-
ret = 0;
flags = 0;
name = NULL;
uuid = NULL;
dmv = NULL;
last_table = NULL;
- str = NULL;
/* char *xml;
xml = prop_dictionary_externalize(dm_dict);
@@ -769,8 +766,7 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
* null and therefore it should be checked before we try to
* use it.
*/
- prop_dictionary_get_cstring(target_dict,
- DM_TABLE_PARAMS, (char**)&str);
+ param_dict = prop_dictionary_get(target_dict, DM_TABLE_PARAMS);
if (SLIST_EMPTY(tbl))
/* insert this table to head */
@@ -783,19 +779,16 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
* therfore I have to pass it to target init
* routine and parse parameters there.
*/
-
if ((ret = target->init(dmv, &table_en->target_config,
- str)) != 0) {
+ param_dict)) != 0) {
dm_table_release(&dmv->table_head, DM_TABLE_INACTIVE);
dm_table_destroy(&dmv->table_head, DM_TABLE_INACTIVE);
- free(str, M_TEMP);
-
+
dm_dev_unbusy(dmv);
return ret;
}
last_table = table_en;
- free(str, M_TEMP);
}
prop_object_iterator_release(iter);