Module Name:    src
Committed By:   haad
Date:           Sat Oct  9 12:56:07 UTC 2010

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

Log Message:
In rome do as romans do. If I will get EEXIST from devsw_attach don't exit and
continue. This unbreaks usage of libdm in RUMP.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 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.23 src/sys/dev/dm/device-mapper.c:1.24
--- src/sys/dev/dm/device-mapper.c:1.23	Tue May 18 15:10:41 2010
+++ src/sys/dev/dm/device-mapper.c	Sat Oct  9 12:56:06 2010
@@ -1,4 +1,4 @@
-/*        $NetBSD: device-mapper.c,v 1.23 2010/05/18 15:10:41 haad Exp $ */
+/*        $NetBSD: device-mapper.c,v 1.24 2010/10/09 12:56:06 haad Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -174,6 +174,8 @@
 
 		error = devsw_attach(dm_cd.cd_name, &dm_bdevsw, &bmajor,
 		    &dm_cdevsw, &cmajor);
+		if (error == EEXIST)
+			error = 0;
 		if (error) {
 			config_cfattach_detach(dm_cd.cd_name, &dm_ca);
 			config_cfdriver_detach(&dm_cd);

Reply via email to