1.1 --- a/libexec/include/exec/elf.h Fri Mar 08 00:26:16 2024 +0100
1.2 +++ b/libexec/include/exec/elf.h Fri Mar 08 00:26:54 2024 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * ELF payload decoding support.
1.6 *
1.7 - * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 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 @@ -41,7 +41,7 @@
1.13 offset_t file_offset();
1.14 l4_addr_t region_address();
1.15 offset_t region_size();
1.16 - l4re_rm_flags_t region_flags();
1.17 + rm_flags_t region_flags();
1.18 };
1.19
1.20
2.1 --- a/libexec/include/exec/segment.h Fri Mar 08 00:26:16 2024 +0100
2.2 +++ b/libexec/include/exec/segment.h Fri Mar 08 00:26:54 2024 +0100
2.3 @@ -1,7 +1,7 @@
2.4 /*
2.5 * Program memory segment support.
2.6 *
2.7 - * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
2.8 + * Copyright (C) 2022, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
2.9 *
2.10 * This program is free software; you can redistribute it and/or
2.11 * modify it under the terms of the GNU General Public License as
2.12 @@ -21,13 +21,10 @@
2.13
2.14 #pragma once
2.15
2.16 -#include <l4/re/c/dataspace.h>
2.17 -#include <l4/re/c/rm.h>
2.18 -
2.19 -#include <fsclient/client.h>
2.20 -
2.21 #include <exec/common.h>
2.22 #include <exec/mapped_region.h>
2.23 +#include <fsclient/client.h>
2.24 +#include <systypes/base.h>
2.25
2.26
2.27
2.28 @@ -42,7 +39,7 @@
2.29 /* Allocated memory. */
2.30
2.31 char *_buf;
2.32 - l4re_ds_t _ds;
2.33 + l4_cap_idx_t _ds;
2.34 file_t *_file = NULL;
2.35 bool _allocated = false, _attached = false;
2.36
2.37 @@ -94,7 +91,7 @@
2.38 virtual offset_t file_offset() = 0;
2.39 virtual l4_addr_t region_address() = 0;
2.40 virtual offset_t region_size() = 0;
2.41 - virtual l4re_rm_flags_t region_flags() = 0;
2.42 + virtual rm_flags_t region_flags() = 0;
2.43 };
2.44
2.45
2.46 @@ -114,14 +111,14 @@
2.47
2.48 /* Access flags. */
2.49
2.50 - l4re_rm_flags_t _flags;
2.51 + rm_flags_t _flags;
2.52
2.53 /* File access details. */
2.54
2.55 offset_t _file_offset, _file_contents;
2.56
2.57 public:
2.58 - explicit ExplicitSegment(l4_addr_t base, offset_t size, l4re_rm_flags_t flags,
2.59 + explicit ExplicitSegment(l4_addr_t base, offset_t size, rm_flags_t flags,
2.60 offset_t file_offset = 0, offset_t file_contents = 0);
2.61
2.62 /* Generic property access. */
2.63 @@ -131,7 +128,7 @@
2.64 offset_t file_offset();
2.65 l4_addr_t region_address();
2.66 offset_t region_size();
2.67 - l4re_rm_flags_t region_flags();
2.68 + rm_flags_t region_flags();
2.69 };
2.70
2.71 /* vim: tabstop=2 expandtab shiftwidth=2
3.1 --- a/libexec/lib/src/elf.cc Fri Mar 08 00:26:16 2024 +0100
3.2 +++ b/libexec/lib/src/elf.cc Fri Mar 08 00:26:54 2024 +0100
3.3 @@ -1,7 +1,7 @@
3.4 /*
3.5 * ELF payload decoding support.
3.6 *
3.7 - * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
3.8 + * Copyright (C) 2022, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
3.9 *
3.10 * This program is free software; you can redistribute it and/or
3.11 * modify it under the terms of the GNU General Public License as
3.12 @@ -65,9 +65,9 @@
3.13 }
3.14
3.15 template <typename PROGRAM_HEADER>
3.16 -l4re_rm_flags_t ProgramSegmentVariant<PROGRAM_HEADER>::region_flags()
3.17 +rm_flags_t ProgramSegmentVariant<PROGRAM_HEADER>::region_flags()
3.18 {
3.19 - l4re_rm_flags_t flags = 0;
3.20 + rm_flags_t flags = 0;
3.21
3.22 if (_header->p_flags & PF_R)
3.23 flags |= L4RE_RM_F_R;
4.1 --- a/libexec/lib/src/segment.cc Fri Mar 08 00:26:16 2024 +0100
4.2 +++ b/libexec/lib/src/segment.cc Fri Mar 08 00:26:54 2024 +0100
4.3 @@ -1,7 +1,7 @@
4.4 /*
4.5 * Program memory segment support.
4.6 *
4.7 - * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
4.8 + * Copyright (C) 2022, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
4.9 *
4.10 * This program is free software; you can redistribute it and/or
4.11 * modify it under the terms of the GNU General Public License as
4.12 @@ -172,7 +172,7 @@
4.13 /* Initialise a memory segment using explicit parameters. */
4.14
4.15 ExplicitSegment::ExplicitSegment(l4_addr_t base, offset_t size,
4.16 - l4re_rm_flags_t flags, offset_t file_offset,
4.17 + rm_flags_t flags, offset_t file_offset,
4.18 offset_t file_contents)
4.19 : _base(base), _size(size), _flags(flags), _file_offset(file_offset),
4.20 _file_contents(file_contents)
4.21 @@ -209,7 +209,7 @@
4.22
4.23 /* Return the region flags for the segment. */
4.24
4.25 -l4re_rm_flags_t ExplicitSegment::region_flags()
4.26 +rm_flags_t ExplicitSegment::region_flags()
4.27 {
4.28 return _flags;
4.29 }
5.1 --- a/libfsclient/include/fsclient/client.h Fri Mar 08 00:26:16 2024 +0100
5.2 +++ b/libfsclient/include/fsclient/client.h Fri Mar 08 00:26:54 2024 +0100
5.3 @@ -1,8 +1,7 @@
5.4 /*
5.5 * Filesystem client functions.
5.6 *
5.7 - * Copyright (C) 2018, 2019, 2020, 2021, 2022,
5.8 - * 2023 Paul Boddie <paul@boddie.org.uk>
5.9 + * Copyright (C) 2018-2024 Paul Boddie <paul@boddie.org.uk>
5.10 *
5.11 * This program is free software; you can redistribute it and/or
5.12 * modify it under the terms of the GNU General Public License as
5.13 @@ -76,8 +75,8 @@
5.14 long client_flush(file_t *file);
5.15 void *client_mmap(file_t *file, offset_t position, offset_t length,
5.16 offset_t start_visible, offset_t end_visible,
5.17 - l4re_rm_flags_t region_flags);
5.18 -l4re_rm_flags_t client_region_flags(prot_t prot, flags_t flags);
5.19 + rm_flags_t region_flags);
5.20 +rm_flags_t client_region_flags(prot_t prot, flags_t flags);
5.21
5.22 /* Pipe region operations. */
5.23
6.1 --- a/libfsclient/include/fsclient/file.h Fri Mar 08 00:26:16 2024 +0100
6.2 +++ b/libfsclient/include/fsclient/file.h Fri Mar 08 00:26:54 2024 +0100
6.3 @@ -1,7 +1,7 @@
6.4 /*
6.5 * File access convenience functions and types.
6.6 *
6.7 - * Copyright (C) 2021, 2022, 2023 Paul Boddie <paul@boddie.org.uk>
6.8 + * Copyright (C) 2021, 2022, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
6.9 *
6.10 * This program is free software; you can redistribute it and/or
6.11 * modify it under the terms of the GNU General Public License as
6.12 @@ -110,11 +110,11 @@
6.13 long file_flush(file_t *file);
6.14 long file_mmap(file_t *file, offset_t position, offset_t length,
6.15 offset_t start_visible, offset_t end_visible,
6.16 - l4re_rm_flags_t region_flags);
6.17 + rm_flags_t region_flags);
6.18 long file_mmap_only(file_t *file, offset_t position, offset_t length,
6.19 offset_t start_visible, offset_t end_visible);
6.20 -flags_t file_opening_flags(l4re_rm_flags_t rm_flags);
6.21 -l4re_rm_flags_t file_region_flags(flags_t flags);
6.22 +flags_t file_opening_flags(rm_flags_t rm_flags);
6.23 +rm_flags_t file_region_flags(flags_t flags);
6.24 long file_resize(file_t *file, offset_t size);
6.25
6.26 /* File and region properties. */
7.1 --- a/libfsclient/lib/src/client.cc Fri Mar 08 00:26:16 2024 +0100
7.2 +++ b/libfsclient/lib/src/client.cc Fri Mar 08 00:26:54 2024 +0100
7.3 @@ -45,17 +45,16 @@
7.4
7.5 /* Merging of region flags from protection and access flags. */
7.6
7.7 -static l4re_rm_flags_t _combine_region_flags(l4re_rm_flags_t region_flags,
7.8 - flags_t flags)
7.9 +static rm_flags_t _combine_region_flags(rm_flags_t region_flags, flags_t flags)
7.10 {
7.11 return region_flags & (file_region_flags(flags) | L4RE_RM_F_X);
7.12 }
7.13
7.14 /* Conversion of protection and access flags to region flags. */
7.15
7.16 -l4re_rm_flags_t client_region_flags(prot_t prot, flags_t flags)
7.17 +rm_flags_t client_region_flags(prot_t prot, flags_t flags)
7.18 {
7.19 - l4re_rm_flags_t rm_flags = 0;
7.20 + rm_flags_t rm_flags = 0;
7.21
7.22 if (prot & PROT_READ)
7.23 rm_flags |= L4RE_RM_F_R;
7.24 @@ -576,7 +575,7 @@
7.25
7.26 void *client_mmap(file_t *file, offset_t position, offset_t length,
7.27 offset_t start_visible, offset_t end_visible,
7.28 - l4re_rm_flags_t region_flags)
7.29 + rm_flags_t region_flags)
7.30 {
7.31 if (!client_opened(file) || file_mmap(file, position, length, start_visible,
7.32 end_visible, region_flags))
8.1 --- a/libfsclient/lib/src/file.cc Fri Mar 08 00:26:16 2024 +0100
8.2 +++ b/libfsclient/lib/src/file.cc Fri Mar 08 00:26:54 2024 +0100
8.3 @@ -366,7 +366,7 @@
8.4
8.5 long file_mmap(file_t *file, offset_t position, offset_t length,
8.6 offset_t start_visible, offset_t end_visible,
8.7 - l4re_rm_flags_t region_flags)
8.8 + rm_flags_t region_flags)
8.9 {
8.10 long err;
8.11
8.12 @@ -414,7 +414,7 @@
8.13
8.14 /* Return opening flags compatible with the given region flags. */
8.15
8.16 -flags_t file_opening_flags(l4re_rm_flags_t rm_flags)
8.17 +flags_t file_opening_flags(rm_flags_t rm_flags)
8.18 {
8.19 if ((rm_flags & L4RE_RM_F_RW) == L4RE_RM_F_RW)
8.20 return O_RDWR;
8.21 @@ -426,9 +426,9 @@
8.22
8.23 /* Return mmap flags corresponding to the file access flags. */
8.24
8.25 -l4re_rm_flags_t file_region_flags(flags_t flags)
8.26 +rm_flags_t file_region_flags(flags_t flags)
8.27 {
8.28 - l4re_rm_flags_t rm_flags;
8.29 + rm_flags_t rm_flags;
8.30
8.31 switch (flags & 3)
8.32 {