Module Name:    src
Committed By:   pooka
Date:           Wed Jan 27 22:03:12 UTC 2010

Modified Files:
        src/sys/rump/librump/rumpvfs: rumpblk.c

Log Message:
Typecast memwinsize to off_t before taking the complement to be
&'ed with an off_t.  Otherwise things go a bit wrong with >4GB
images ...


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 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.35 src/sys/rump/librump/rumpvfs/rumpblk.c:1.36
--- src/sys/rump/librump/rumpvfs/rumpblk.c:1.35	Tue Dec 22 14:18:33 2009
+++ src/sys/rump/librump/rumpvfs/rumpblk.c	Wed Jan 27 22:03:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpblk.c,v 1.35 2009/12/22 14:18:33 pooka Exp $	*/
+/*	$NetBSD: rumpblk.c,v 1.36 2010/01/27 22:03: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.35 2009/12/22 14:18:33 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.36 2010/01/27 22:03:11 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -81,7 +81,7 @@
 unsigned memwinsize = (1<<20);
 unsigned memwincnt = 16;
 
-#define STARTWIN(off)		((off) & ~(memwinsize-1))
+#define STARTWIN(off)		((off) & ~((off_t)memwinsize-1))
 #define INWIN(win,off)		((win)->win_off == STARTWIN(off))
 #define WINSIZE(rblk, win)	(MIN((rblk->rblk_size-win->win_off),memwinsize))
 #define WINVALID(win)		((win)->win_off != (off_t)-1)

Reply via email to