summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-09-11 21:15:20 +0000
committerneel <neel@FreeBSD.org>2014-09-11 21:15:20 +0000
commitf77eeffc087581eab47cb739bbe9642b24a190eb (patch)
treeba8320fc0cfb4c3d24faaff21019ed55e204bd6e /usr.sbin
parent081aa8a15cafb217da990350e158841f186feab9 (diff)
downloadFreeBSD-src-f77eeffc087581eab47cb739bbe9642b24a190eb.zip
FreeBSD-src-f77eeffc087581eab47cb739bbe9642b24a190eb.tar.gz
Initialize 'bc_rdonly' to the right value.
Note that independent of this change a readonly disk file would still be opened O_RDONLY and protected from writes by the guest. Reviewed by: grehan
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/block_if.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c
index 1ec0344..b038228 100644
--- a/usr.sbin/bhyve/block_if.c
+++ b/usr.sbin/bhyve/block_if.c
@@ -278,6 +278,7 @@ blockif_open(const char *optstr, const char *ident)
bc->bc_magic = BLOCKIF_SIG;
bc->bc_fd = fd;
+ bc->bc_rdonly = ro;
bc->bc_size = size;
bc->bc_sectsz = sectsz;
pthread_mutex_init(&bc->bc_mtx, NULL);
OpenPOWER on IntegriCloud