From 536aa3a3062fcf9b455ea9fa99f6e403ea72193e Mon Sep 17 00:00:00 2001 From: pooka Date: Mon, 12 Apr 2010 22:29:11 +0000 Subject: 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. --- sys/dev/fss.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/dev') 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 -__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 #include @@ -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); -- cgit