mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
Kernel: Simplify FS::create_directory() a little bit
None of the clients of this function actually used the returned Inode, so it can simply return a KResult instead.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 09:32:11 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8731682d0ec
@@ -355,11 +355,7 @@ KResult VFS::mkdir(StringView path, mode_t mode, Custody& base)
|
||||
#ifdef VFS_DEBUG
|
||||
dbg() << "VFS::mkdir: '" << p.basename() << "' in " << parent_inode.identifier();
|
||||
#endif
|
||||
int error;
|
||||
auto new_dir = parent_inode.fs().create_directory(parent_inode.identifier(), p.basename(), mode, current->process().uid(), current->process().gid(), error);
|
||||
if (new_dir)
|
||||
return KSuccess;
|
||||
return KResult(error);
|
||||
return parent_inode.fs().create_directory(parent_inode.identifier(), p.basename(), mode, current->process().uid(), current->process().gid());
|
||||
}
|
||||
|
||||
KResult VFS::access(StringView path, int mode, Custody& base)
|
||||
|
||||
Reference in New Issue
Block a user