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);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to