summaryrefslogtreecommitdiff
path: root/usr.sbin/vmd/vioraw.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2018-09-28 12:35:33 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2018-09-28 12:35:33 +0000
commitf083eda9b4710f7d420f37b619d903b72f67345f (patch)
treeb06584180427ef7e6d6690dc943d11385028d7b3 /usr.sbin/vmd/vioraw.c
parent4746c04a21cd3a8739a8593f19f6929e792dc5f8 (diff)
Support vmd-internal's vmboot with qcow2 disk images.
OK mlarkin@
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);
}