1.1 --- a/libfsclient/lib/src/file.cc Thu Mar 07 22:41:40 2024 +0100
1.2 +++ b/libfsclient/lib/src/file.cc Thu Mar 07 23:50:26 2024 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * File access convenience functions.
1.6 *
1.7 - * Copyright (C) 2021, 2022, 2023 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2021, 2022, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -267,8 +267,7 @@
1.13 return -L4_EINVAL;
1.14
1.15 client_Opener opener(server);
1.16 - offset_t size;
1.17 - map_flags_t flags;
1.18 + ds_stats_t stats;
1.19 long err;
1.20
1.21 file_init(file);
1.22 @@ -280,14 +279,14 @@
1.23
1.24 client_Dataspace context_ds(file->ref);
1.25
1.26 - err = context_ds.info(&size, &flags);
1.27 + err = context_ds.info(&stats);
1.28 if (err)
1.29 return err;
1.30
1.31 file->start_pos = 0;
1.32 - file->end_pos = size;
1.33 + file->end_pos = stats.size;
1.34
1.35 - return ipc_attach_dataspace(file->ref, size, (void **) &file->memory);
1.36 + return ipc_attach_dataspace(file->ref, stats.size, (void **) &file->memory);
1.37 }
1.38
1.39 /* Make a directory using the given context. */