Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/dm In rome do as romans do. If I will get EEXIST fro...



details:   https://anonhg.NetBSD.org/src/rev/71e4d791a91d
branches:  trunk
changeset: 757975:71e4d791a91d
user:      haad <haad%NetBSD.org@localhost>
date:      Sat Oct 09 12:56:06 2010 +0000

description:
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.

diffstat:

 sys/dev/dm/device-mapper.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r f87594a60b6c -r 71e4d791a91d sys/dev/dm/device-mapper.c
--- a/sys/dev/dm/device-mapper.c        Sat Oct 09 07:40:58 2010 +0000
+++ b/sys/dev/dm/device-mapper.c        Sat Oct 09 12:56:06 2010 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: device-mapper.c,v 1.23 2010/05/18 15:10:38 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);



Home | Main Index | Thread Index | Old Index