mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 05:11:32 +00:00
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>
This commit is contained in:
parent
b8a4209523
commit
d4afcba95f
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user