diff options
Diffstat (limited to 'src/basic/blockdev-util.c')
-rw-r--r-- | src/basic/blockdev-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/blockdev-util.c b/src/basic/blockdev-util.c index 4e68e2496b..abf9bf02d8 100644 --- a/src/basic/blockdev-util.c +++ b/src/basic/blockdev-util.c @@ -68,7 +68,7 @@ int get_block_device(const char *path, dev_t *ret) { /* Gets the block device directly backing a file system. If the block device is encrypted, returns * the device mapper block device. */ - fd = open(path, O_NOFOLLOW|O_CLOEXEC); + fd = open(path, O_RDONLY|O_NOFOLLOW|O_CLOEXEC); if (fd < 0) return -errno; |