Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2014 21:15:21 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271439 - head/usr.sbin/bhyve
Message-ID:  <201409112115.s8BLFLA9060987@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: neel
Date: Thu Sep 11 21:15:20 2014
New Revision: 271439
URL: http://svnweb.freebsd.org/changeset/base/271439

Log:
  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

Modified:
  head/usr.sbin/bhyve/block_if.c

Modified: head/usr.sbin/bhyve/block_if.c
==============================================================================
--- head/usr.sbin/bhyve/block_if.c	Thu Sep 11 20:21:03 2014	(r271438)
+++ head/usr.sbin/bhyve/block_if.c	Thu Sep 11 21:15:20 2014	(r271439)
@@ -278,6 +278,7 @@ blockif_open(const char *optstr, const c
 
 	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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409112115.s8BLFLA9060987>