summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_target_mirror.c
diff options
context:
space:
mode:
authorhaad <haad@NetBSD.org>2009-06-05 19:56:40 +0000
committerhaad <haad@NetBSD.org>2009-06-05 19:56:40 +0000
commit62e994ce9603e863ae6d9a2bbbe8aa35680d2e7c (patch)
tree81f57723f2115ad75e4da1513a144b0889ee67ab /sys/dev/dm/dm_target_mirror.c
parent57b5269dadf2793c8fbd645371798c39920070e7 (diff)
Parse dm param string in libdevmapper and not in a dm target init function.
Create proplib param dictionary entry in libdevmapper and pass it to dm in dm_ioctl dict. Param target is then passed to target init function, where is parse. I like this aproach much better than passing char **argv and trusting to user input. I have bumped minor lib/driver version. XXX. Add more sanity checks in kernel.
Diffstat (limited to 'sys/dev/dm/dm_target_mirror.c')
-rw-r--r--sys/dev/dm/dm_target_mirror.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/dm/dm_target_mirror.c b/sys/dev/dm/dm_target_mirror.c
index 9ef02df0681..9f1a17e9404 100644
--- a/sys/dev/dm/dm_target_mirror.c
+++ b/sys/dev/dm/dm_target_mirror.c
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_mirror.c,v 1.5 2009/03/01 23:16:51 haad Exp $*/
+/*$NetBSD: dm_target_mirror.c,v 1.6 2009/06/05 19:56:40 haad Exp $*/
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -104,7 +104,7 @@ dm_target_mirror_modcmd(modcmd_t cmd, void *arg)
* 0 52428800 mirror clustered_disk 4 253:2 1024 UUID block_on_error 3 253:3 0 253:4 0 253:5 0
*/
int
-dm_target_mirror_init(dm_dev_t *dmv, void **target_config, char *argv)
+dm_target_mirror_init(dm_dev_t *dmv, void **target_config, prop_dictionary_t dict)
{
printf("Mirror target init function called!!\n");