summaryrefslogtreecommitdiff
path: root/sys/dev/fss.c
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2010-04-12 22:29:11 +0000
committerpooka <pooka@NetBSD.org>2010-04-12 22:29:11 +0000
commit536aa3a3062fcf9b455ea9fa99f6e403ea72193e (patch)
treec3892fa61c0222ab73c1eab89a239084c9df0186 /sys/dev/fss.c
parent90bd012fbeef2c6218af6e4a4fafde29207408e3 (diff)
Ignore EEXIST from devsw_attach. This is not the optimal solution,
but it makes it possible to dynamically create device nodes for fss before the fss module init runs by allowing to run devsw_attach earlier.
Diffstat (limited to 'sys/dev/fss.c')
-rw-r--r--sys/dev/fss.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/fss.c b/sys/dev/fss.c
index bec59bf7f78..fdc5e150190 100644
--- a/sys/dev/fss.c
+++ b/sys/dev/fss.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fss.c,v 1.66 2010/04/05 09:30:46 hannken Exp $ */
+/* $NetBSD: fss.c,v 1.67 2010/04/12 22:29:11 pooka Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.66 2010/04/05 09:30:46 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.67 2010/04/12 22:29:11 pooka Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1248,6 +1248,8 @@ fss_modcmd(modcmd_t cmd, void *arg)
}
error = devsw_attach(fss_cd.cd_name,
&fss_bdevsw, &bmajor, &fss_cdevsw, &cmajor);
+ if (error == EEXIST)
+ error = 0;
if (error) {
config_cfattach_detach(fss_cd.cd_name, &fss_ca);
config_cfdriver_detach(&fss_cd);