Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4afcba9 authored by Martin Pärtel's avatar Martin Pärtel Committed by Richard Weinberger
Browse files

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: default avatarMartin Pärtel <martin.partel@gmail.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent b8a42095
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;