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 2014-09-11 21:15:20 +00:00
parent 081aa8a15c
commit f77eeffc08

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