mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
Revert "Kernel: Make VFS::create() fail with EINVAL on invalid file mode"
This reverts commit ca3489eec7
.
Fixes #5087.
This commit is contained in:
parent
50a2cb38e5
commit
2112b79986
Notes:
sideshowbarker
2024-07-18 22:54:25 +09:00
Author: https://github.com/awesomekling
Commit: 2112b79986
1 changed files with 4 additions and 2 deletions
|
@ -389,8 +389,10 @@ KResultOr<NonnullRefPtr<FileDescription>> VFS::create(StringView path, int optio
|
|||
if (result.is_error())
|
||||
return result;
|
||||
|
||||
if (!is_regular_file(mode) && !is_socket(mode) && !is_fifo(mode) && !is_block_device(mode) && !is_character_device(mode))
|
||||
return EINVAL;
|
||||
if (!is_socket(mode) && !is_fifo(mode) && !is_block_device(mode) && !is_character_device(mode)) {
|
||||
// Turn it into a regular file. (This feels rather hackish.)
|
||||
mode |= 0100000;
|
||||
}
|
||||
|
||||
auto& parent_inode = parent_custody.inode();
|
||||
auto current_process = Process::current();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue