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 Typecast memwinsize to off_t before...
details: https://anonhg.NetBSD.org/src/rev/7bea78153625
branches: trunk
changeset: 751201:7bea78153625
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Jan 27 22:03:11 2010 +0000
description:
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 ...
diffstat:
sys/rump/librump/rumpvfs/rumpblk.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r cbc03bb32c46 -r 7bea78153625 sys/rump/librump/rumpvfs/rumpblk.c
--- a/sys/rump/librump/rumpvfs/rumpblk.c Wed Jan 27 21:02:22 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rumpblk.c Wed Jan 27 22:03:11 2010 +0000
@@ -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)
Home |
Main Index |
Thread Index |
Old Index