Module Name: src
Committed By: pgoyette
Date: Sat Dec 26 10:22:09 UTC 2015
Modified Files:
src/sys/rump/dev/lib/libraidframe: raidframe_component.c
Log Message:
Detach the {b,c}devsw after obtaining the device major numbers. We'll
re-attach during module initialization.
This enables the atf tests to once again succeed.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/sys/rump/dev/lib/libraidframe/raidframe_component.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/rump/dev/lib/libraidframe/raidframe_component.c
diff -u src/sys/rump/dev/lib/libraidframe/raidframe_component.c:1.3 src/sys/rump/dev/lib/libraidframe/raidframe_component.c:1.4
--- src/sys/rump/dev/lib/libraidframe/raidframe_component.c:1.3 Sat Dec 26 01:01:30 2015
+++ src/sys/rump/dev/lib/libraidframe/raidframe_component.c Sat Dec 26 10:22:09 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: raidframe_component.c,v 1.3 2015/12/26 01:01:30 pgoyette Exp $ */
+/* $NetBSD: raidframe_component.c,v 1.4 2015/12/26 10:22:09 pgoyette Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raidframe_component.c,v 1.3 2015/12/26 01:01:30 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raidframe_component.c,v 1.4 2015/12/26 10:22:09 pgoyette Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -46,13 +46,17 @@ RUMP_COMPONENT(RUMP_COMPONENT_DEV)
devmajor_t bmaj, cmaj;
int error;
- config_cfdriver_attach(&raid_cd);
-
bmaj = cmaj = -1;
if ((error = devsw_attach("raid", &raid_bdevsw, &bmaj,
&raid_cdevsw, &cmaj)) != 0)
panic("raid devsw attach failed: %d", error);
+ /*
+ * Now that we have the major numbers, detach. It will get
+ * re-attached later during raid's module initialization.
+ */
+ devsw_detach(&raid_bdevsw, &raid_cdevsw);
+
if ((error = rump_vfs_makedevnodes(S_IFBLK, "/dev/raid0", 'a',
bmaj, 0, 7)) != 0)
panic("cannot create cooked raid dev nodes: %d", error);