提交 d4afcba9 编写于 作者: M Martin Pärtel 提交者: Richard Weinberger

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: NMartin Pärtel <martin.partel@gmail.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 b8a42095
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册