1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

LibCore+AK: Move MappedFile from AK to LibCore

MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
This commit is contained in:
Andreas Kling 2021-11-23 11:32:25 +01:00
parent c1c9da6c35
commit 58fb3ebf66
48 changed files with 101 additions and 103 deletions

View file

@ -4,12 +4,12 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/MappedFile.h>
#include <AK/String.h>
#include <AK/StringBuilder.h>
#include <AK/StringView.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/File.h>
#include <LibCore/MappedFile.h>
#include <LibELF/DynamicLoader.h>
#include <LibELF/DynamicObject.h>
#include <LibELF/Image.h>
@ -283,7 +283,7 @@ int main(int argc, char** argv)
display_hardening = true;
}
auto file_or_error = MappedFile::map(path);
auto file_or_error = Core::MappedFile::map(path);
if (file_or_error.is_error()) {
warnln("Unable to map file {}: {}", path, file_or_error.error());
@ -315,7 +315,7 @@ int main(int argc, char** argv)
warnln("Warning: Dynamic ELF object has no interpreter path. Using: {}", interpreter_path);
}
auto interpreter_file_or_error = MappedFile::map(interpreter_path);
auto interpreter_file_or_error = Core::MappedFile::map(interpreter_path);
if (interpreter_file_or_error.is_error()) {
warnln("Unable to map interpreter file {}: {}", interpreter_path, interpreter_file_or_error.error());