diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2012-08-01 22:44:22 (GMT) |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-08-01 22:44:49 (GMT) |
commit | d4afcba95fca4dd0f831fe72c1fa4f0638f23765 (patch) | |
tree | 938dad1dd5cb1b0abf9946cf40b050d95c4bffd4 /arch/um/drivers | |
parent | b8a420952336ed81ef5c9bf8bad90d3deaee5521 (diff) | |
download | linux-d4afcba95fca4dd0f831fe72c1fa4f0638f23765.tar.xz |
um: fix ubd_file_size for read-only files
Made ubd_file_size not request write access. Fixes use of read-only images.
Signed-off-by: Martin Pärtel <martin.partel@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 20505ca..0643e5b 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c @@ -514,7 +514,7 @@ static inline int ubd_file_size(struct ubd *ubd_dev, __u64 *size_out) goto out; } - fd = os_open_file(ubd_dev->file, global_openflags, 0); + fd = os_open_file(ubd_dev->file, of_read(OPENFLAGS()), 0); if (fd < 0) return fd; |