summaryrefslogtreecommitdiff
path: root/usr.sbin/vmd/vioraw.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/vmd/vioraw.c')
-rw-r--r--usr.sbin/vmd/vioraw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/vmd/vioraw.c b/usr.sbin/vmd/vioraw.c
index 621d7a6854d..e02ab67c5dc 100644
--- a/usr.sbin/vmd/vioraw.c
+++ b/usr.sbin/vmd/vioraw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vioraw.c,v 1.2 2018/09/19 04:29:21 ccardenas Exp $ */
+/* $OpenBSD: vioraw.c,v 1.3 2018/09/28 12:35:32 reyk Exp $ */
/*
* Copyright (c) 2018 Ori Bernstein <ori@eigenstate.org>
*
@@ -40,9 +40,10 @@ raw_pwrite(void *file, char *buf, size_t len, off_t off)
}
static void
-raw_close(void *file)
+raw_close(void *file, int stayopen)
{
- close(*(int *)file);
+ if (!stayopen)
+ close(*(int *)file);
free(file);
}