Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs Use reserved major for rumpblk inst...
details: https://anonhg.NetBSD.org/src/rev/0ff57404962e
branches: trunk
changeset: 753961:0ff57404962e
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 14 16:05:53 2010 +0000
description:
Use reserved major for rumpblk instead of picking something which
may conflict.
diffstat:
sys/rump/librump/rumpvfs/rump_vfs_private.h | 4 ++--
sys/rump/librump/rumpvfs/rumpblk.c | 16 +++++++++-------
sys/rump/librump/rumpvfs/rumpfs.c | 6 +++---
3 files changed, 14 insertions(+), 12 deletions(-)
diffs (90 lines):
diff -r 9eca00f12eac -r 0ff57404962e sys/rump/librump/rumpvfs/rump_vfs_private.h
--- a/sys/rump/librump/rumpvfs/rump_vfs_private.h Wed Apr 14 16:05:23 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs_private.h Wed Apr 14 16:05:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_vfs_private.h,v 1.10 2009/12/17 00:29:46 pooka Exp $ */
+/* $NetBSD: rump_vfs_private.h,v 1.11 2010/04/14 16:05:53 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -37,7 +37,7 @@
int rump_devnull_init(void);
-#define RUMPBLK 254
+#define RUMPBLK_DEVMAJOR 197 /* from conf/majors, XXX: not via config yet */
#define RUMPBLK_SIZENOTSET ((uint64_t)-1)
int rumpblk_register(const char *, devminor_t *, uint64_t, uint64_t);
int rumpblk_init(void);
diff -r 9eca00f12eac -r 0ff57404962e sys/rump/librump/rumpvfs/rumpblk.c
--- a/sys/rump/librump/rumpvfs/rumpblk.c Wed Apr 14 16:05:23 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rumpblk.c Wed Apr 14 16:05:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpblk.c,v 1.37 2010/01/31 13:15:08 pooka Exp $ */
+/* $NetBSD: rumpblk.c,v 1.38 2010/04/14 16:05:53 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.37 2010/01/31 13:15:08 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.38 2010/04/14 16:05:53 pooka Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -297,7 +297,7 @@
rumpblk_init(void)
{
char buf[64];
- int rumpblk = RUMPBLK;
+ devmajor_t rumpblkmaj = RUMPBLK_DEVMAJOR;
unsigned tmp;
int error, i;
@@ -374,11 +374,13 @@
"rumpblk", "memblk all windows busy");
if (blkfail) {
- return devsw_attach("rumpblk", &rumpblk_bdevsw_fail, &rumpblk,
- &rumpblk_cdevsw, &rumpblk);
+ return devsw_attach("rumpblk",
+ &rumpblk_bdevsw_fail, &rumpblkmaj,
+ &rumpblk_cdevsw, &rumpblkmaj);
} else {
- return devsw_attach("rumpblk", &rumpblk_bdevsw, &rumpblk,
- &rumpblk_cdevsw, &rumpblk);
+ return devsw_attach("rumpblk",
+ &rumpblk_bdevsw, &rumpblkmaj,
+ &rumpblk_cdevsw, &rumpblkmaj);
}
}
diff -r 9eca00f12eac -r 0ff57404962e sys/rump/librump/rumpvfs/rumpfs.c
--- a/sys/rump/librump/rumpvfs/rumpfs.c Wed Apr 14 16:05:23 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rumpfs.c Wed Apr 14 16:05:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpfs.c,v 1.38 2010/04/12 21:37:44 pooka Exp $ */
+/* $NetBSD: rumpfs.c,v 1.39 2010/04/14 16:05:53 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.38 2010/04/12 21:37:44 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.39 2010/04/14 16:05:53 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -234,7 +234,7 @@
if (error != 0) {
return error;
}
- rdev = makedev(RUMPBLK, dmin);
+ rdev = makedev(RUMPBLK_DEVMAJOR, dmin);
}
et = kmem_alloc(sizeof(*et), KM_SLEEP);
Home |
Main Index |
Thread Index |
Old Index