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 fix KASSERT snafu. spotted by test...



details:   https://anonhg.NetBSD.org/src/rev/8fe5b2652baa
branches:  trunk
changeset: 761642:8fe5b2652baa
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Feb 03 22:16:11 2011 +0000

description:
fix KASSERT snafu.  spotted by tests, as usual.

diffstat:

 sys/rump/librump/rumpvfs/rumpblk.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r b0bfb5de865a -r 8fe5b2652baa sys/rump/librump/rumpvfs/rumpblk.c
--- a/sys/rump/librump/rumpvfs/rumpblk.c        Thu Feb 03 22:04:09 2011 +0000
+++ b/sys/rump/librump/rumpvfs/rumpblk.c        Thu Feb 03 22:16:11 2011 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index