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:
parent
081aa8a15c
commit
f77eeffc08
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user