1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:14:58 +00:00

LibFileSystem+Everything: Remove resolve_executable_from_environment

This commit is contained in:
Ben Wiederhake 2023-05-29 22:20:05 +02:00 committed by Jelle Raaijmakers
parent 26efdf9d4f
commit f20d04726a
12 changed files with 12 additions and 23 deletions

View file

@ -4,16 +4,16 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/String.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/MappedFile.h>
#include <LibCore/System.h>
#include <LibELF/Image.h>
#include <LibFileSystem/FileSystem.h>
#include <LibMain/Main.h>
static ErrorOr<bool> is_dynamically_linked_executable(StringView filename)
{
auto executable = TRY(FileSystem::resolve_executable_from_environment(filename));
auto executable = TRY(Core::System::resolve_executable_from_environment(filename));
auto file = TRY(Core::MappedFile::map(executable));
ELF::Image elf_image(file->bytes());
return elf_image.is_dynamic();