From 9cf08a1e73e80d9752d6f1d2d6518959ff40beda Mon Sep 17 00:00:00 2001 From: pooka Date: Wed, 2 Feb 2011 15:55:22 +0000 Subject: [PATCH] never open rumpblk backend with O_TRUNC XXX: the rumpuser_open interface needs a beating --- sys/rump/librump/rumpvfs/rumpblk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/rump/librump/rumpvfs/rumpblk.c b/sys/rump/librump/rumpvfs/rumpblk.c index 975d0c10b8c8..adfc3ce47c9b 100644 --- a/sys/rump/librump/rumpvfs/rumpblk.c +++ b/sys/rump/librump/rumpvfs/rumpblk.c @@ -1,4 +1,4 @@ -/* $NetBSD: rumpblk.c,v 1.42 2010/09/06 18:03:57 pooka Exp $ */ +/* $NetBSD: rumpblk.c,v 1.43 2011/02/02 15:55:22 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.42 2010/09/06 18:03:57 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.43 2011/02/02 15:55:22 pooka Exp $"); #include #include @@ -488,6 +488,7 @@ rumpblk_open(dev_t dev, int flag, int fmt, struct lwp *l) if (rblk->rblk_fd != -1) return 0; /* XXX: refcount, open mode */ + flag &= ~O_TRUNC; fd = rumpuser_open(rblk->rblk_path, OFLAGS(flag), &error); if (error) return error;