abench: Prefer FileSystem over DeprecatedFile

This commit is contained in:
Ben Wiederhake 2023-05-13 13:00:22 +02:00 committed by Andreas Kling
parent 0b49b93e98
commit 951b77e04d
Notes: sideshowbarker 2024-07-17 18:38:54 +09:00
2 changed files with 3 additions and 3 deletions

View file

@ -71,7 +71,7 @@ install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/egrep SYMBOLIC)"
install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/fgrep SYMBOLIC)")
install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/rgrep SYMBOLIC)")
target_link_libraries(abench PRIVATE LibAudio)
target_link_libraries(abench PRIVATE LibAudio LibFileSystem)
target_link_libraries(aplay PRIVATE LibAudio LibIPC)
target_link_libraries(asctl PRIVATE LibAudio LibIPC)
target_link_libraries(bt PRIVATE LibSymbolication)

View file

@ -8,9 +8,9 @@
#include <AK/Types.h>
#include <LibAudio/Loader.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/DeprecatedFile.h>
#include <LibCore/ElapsedTimer.h>
#include <LibCore/System.h>
#include <LibFileSystem/FileSystem.h>
#include <LibMain/Main.h>
#include <stdio.h>
@ -28,7 +28,7 @@ ErrorOr<int> serenity_main(Main::Arguments args)
args_parser.add_option(sample_count, "How many samples to load at maximum", "sample-count", 's', "samples");
args_parser.parse(args);
TRY(Core::System::unveil(Core::DeprecatedFile::absolute_path(path), "r"sv));
TRY(Core::System::unveil(TRY(FileSystem::absolute_path(path)), "r"sv));
TRY(Core::System::unveil(nullptr, nullptr));
TRY(Core::System::pledge("stdio recvfd rpath"));