Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/dev/lib/libraidframe Detach the {b, c}devsw after ob...
details: https://anonhg.NetBSD.org/src/rev/c4ab82435665
branches: trunk
changeset: 342515:c4ab82435665
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sat Dec 26 10:22:09 2015 +0000
description:
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.
diffstat:
sys/rump/dev/lib/libraidframe/raidframe_component.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 2b44d116f81b -r c4ab82435665 sys/rump/dev/lib/libraidframe/raidframe_component.c
--- a/sys/rump/dev/lib/libraidframe/raidframe_component.c Sat Dec 26 08:01:58 2015 +0000
+++ b/sys/rump/dev/lib/libraidframe/raidframe_component.c Sat Dec 26 10:22:09 2015 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index