mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Use TRY() in find_elf_interpreter_for_executable()
This commit is contained in:
parent
511ebffd94
commit
009ea5013d
Notes:
sideshowbarker
2024-07-18 04:35:29 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/009ea5013d0
1 changed files with 1 additions and 6 deletions
|
@ -756,12 +756,7 @@ KResultOr<RefPtr<FileDescription>> Process::find_elf_interpreter_for_executable(
|
|||
|
||||
if (!interpreter_path.is_empty()) {
|
||||
dbgln_if(EXEC_DEBUG, "exec({}): Using program interpreter {}", path, interpreter_path);
|
||||
auto interp_result = VirtualFileSystem::the().open(interpreter_path, O_EXEC, 0, current_directory());
|
||||
if (interp_result.is_error()) {
|
||||
dbgln("exec({}): Unable to open program interpreter {}", path, interpreter_path);
|
||||
return interp_result.error();
|
||||
}
|
||||
auto interpreter_description = interp_result.value();
|
||||
auto interpreter_description = TRY(VirtualFileSystem::the().open(interpreter_path, O_EXEC, 0, current_directory()));
|
||||
auto interp_metadata = interpreter_description->metadata();
|
||||
|
||||
VERIFY(interpreter_description->inode());
|
||||
|
|
Loading…
Reference in a new issue