Module Name:    src
Committed By:   jakllsch
Date:           Fri Feb 26 23:52:43 UTC 2010

Modified Files:
        src/sys/dev/dm: device-mapper.c

Log Message:
Use correct prototype for dmattach().


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/dm/device-mapper.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.17 src/sys/dev/dm/device-mapper.c:1.18
--- src/sys/dev/dm/device-mapper.c:1.17	Thu Feb 25 23:37:39 2010
+++ src/sys/dev/dm/device-mapper.c	Fri Feb 26 23:52:43 2010
@@ -1,4 +1,4 @@
-/*        $NetBSD: device-mapper.c,v 1.17 2010/02/25 23:37:39 haad Exp $ */
+/*        $NetBSD: device-mapper.c,v 1.18 2010/02/26 23:52:43 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -46,7 +46,6 @@
 #include <sys/ioccom.h>
 #include <sys/kmem.h>
 #include <sys/module.h>
-#include <sys/once.h>
 
 #include "netbsd-dm.h"
 #include "dm.h"
@@ -60,9 +59,10 @@
 static dev_type_size(dmsize);
 
 /* attach and detach routines */
-int dmattach(void);
+void dmattach(int);
 int dmdestroy(void);
 
+static int doinit(void);
 static int dm_cmd_to_fun(prop_dictionary_t);
 static int disk_ioctl_switch(dev_t, u_long, void *);
 static int dm_ioctl_switch(u_long);
@@ -161,11 +161,9 @@
 		if (error)
 			break;
 
-		error = dmattach();
+		error = doinit();
 		if (error) {
 			config_cfdriver_detach(&dm_cd);
-			aprint_error("%s: unable to register cfattach\n",
-			    dm_cd.cd_name);
 			break;
 		}
 
@@ -278,7 +276,8 @@
 	
 	error = config_cfattach_attach(dm_cd.cd_name, &dm_ca);
 	if (error) {
-		aprint_error("Unable to register cfattach for dm driver\n");
+		aprint_error("%s: unable to register cfattach\n",
+		    dm_cd.cd_name);
 		return error;
 	}
 	
@@ -290,12 +289,10 @@
 }
 
 /* attach routine */
-int
-dmattach(void)
+void
+dmattach(int n)
 {
-	static ONCE_DECL(control);
-
-	return RUN_ONCE(&control, doinit);
+	doinit();
 }
 
 /* Destroy routine */

Reply via email to