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
This commit is contained in:
Neel Natu 2014-09-11 21:15:20 +00:00
parent 4f8585e021
commit 1aba8e7ff8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271439

View File

@ -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);