On 30.07.2025 14:22, Juergen Gross wrote:
> Mini-OS doesn't support using mmap() for accessing a file. In order
> to support reading the live update state from a 9pfs based file, use
> fread() instead of mmap().
>
> While adding the offset member to lu_state, change the type of "size"
> to size_t in order to avoid problems with state exceeding 4GB.
>
> Signed-off-by: Juergen Gross <[email protected]>
> Reviewed-by: Jason Andryuk <[email protected]>
> ---
> V2:
> - move to start of series
> V3:
> - change offset to off64_t and size to size_t (Andrew Cooper)
Wasn't that meant to also cover ...
> --- a/tools/xenstored/lu.c
> +++ b/tools/xenstored/lu.c
> @@ -27,9 +27,11 @@ struct live_update *lu_status;
>
> struct lu_dump_state {
> void *buf;
> - unsigned int size;
> - int fd;
> + unsigned int buf_size;
... this field?
Jan
> + size_t size;
> + size_t offset;
> char *filename;
> + FILE *fp;
> };