From owner-svn-src-head@FreeBSD.ORG Thu Sep 11 21:15:21 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 437F42AD; Thu, 11 Sep 2014 21:15:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 303C475F; Thu, 11 Sep 2014 21:15:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BLFLpK060988; Thu, 11 Sep 2014 21:15:21 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BLFLA9060987; Thu, 11 Sep 2014 21:15:21 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201409112115.s8BLFLA9060987@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 11 Sep 2014 21:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271439 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 21:15:21 -0000 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);