mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +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
|
@ -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…
Reference in a new issue