diff options
| author | haad <haad@NetBSD.org> | 2010-10-09 12:56:06 +0000 |
|---|---|---|
| committer | haad <haad@NetBSD.org> | 2010-10-09 12:56:06 +0000 |
| commit | 2b4880da464c07d3dafbc4b622e7a6ce5fdf3d95 (patch) | |
| tree | 0213a37110c3866bf543c5df01130170fed26b37 /sys/dev/dm | |
| parent | 1318c0e8c4800c39474bfbd79ded257960483e91 (diff) | |
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 (limited to 'sys/dev/dm')
| -rw-r--r-- | sys/dev/dm/device-mapper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/dm/device-mapper.c b/sys/dev/dm/device-mapper.c index ad3c0c5d9db..2452e67b570 100644 --- a/sys/dev/dm/device-mapper.c +++ b/sys/dev/dm/device-mapper.c @@ -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 @@ dm_modcmd(modcmd_t cmd, void *arg) 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); |
