Module Name: src
Committed By: pooka
Date: Thu Feb 3 22:16:11 UTC 2011
Modified Files:
src/sys/rump/librump/rumpvfs: rumpblk.c
Log Message:
fix KASSERT snafu. spotted by tests, as usual.
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/rump/librump/rumpvfs/rumpblk.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/librump/rumpvfs/rumpblk.c
diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.45 src/sys/rump/librump/rumpvfs/rumpblk.c:1.46
--- src/sys/rump/librump/rumpvfs/rumpblk.c:1.45 Thu Feb 3 15:36:30 2011
+++ src/sys/rump/librump/rumpvfs/rumpblk.c Thu Feb 3 22:16:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpblk.c,v 1.45 2011/02/03 15:36:30 pooka Exp $ */
+/* $NetBSD: rumpblk.c,v 1.46 2011/02/03 22:16:11 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.45 2011/02/03 15:36:30 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.46 2011/02/03 22:16:11 pooka Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -368,6 +368,7 @@
for (i = 0; i < RUMPBLK_SIZE; i++) {
mutex_init(&minors[i].rblk_memmtx, MUTEX_DEFAULT, IPL_NONE);
cv_init(&minors[i].rblk_memcv, "rblkmcv");
+ minors[i].rblk_fd = -1;
}
evcnt_attach_dynamic(&ev_io_total, EVCNT_TYPE_MISC, NULL,
@@ -501,7 +502,7 @@
{
int error, fd;
- KASSERT(rblk->rblk_fd != -1);
+ KASSERT(rblk->rblk_fd == -1);
fd = rumpuser_open(path, O_RDWR, &error);
if (error) {
fd = rumpuser_open(path, O_RDONLY, &error);