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
4f8585e021
commit
1aba8e7ff8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271439
@ -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…
Reference in New Issue
Block a user