mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00: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:
parent
cb97ef5589
commit
8731682d0e
10 changed files with 22 additions and 25 deletions
|
@ -117,12 +117,15 @@ RefPtr<Inode> TmpFS::create_inode(InodeIdentifier parent_id, const String& name,
|
|||
return inode;
|
||||
}
|
||||
|
||||
RefPtr<Inode> TmpFS::create_directory(InodeIdentifier parent_id, const String& name, mode_t mode, uid_t uid, gid_t gid, int& error)
|
||||
KResult TmpFS::create_directory(InodeIdentifier parent_id, const String& name, mode_t mode, uid_t uid, gid_t gid)
|
||||
{
|
||||
// Ensure it's a directory.
|
||||
mode &= ~0170000;
|
||||
mode |= 0040000;
|
||||
return create_inode(parent_id, name, mode, 0, 0, uid, gid, error);
|
||||
int error;
|
||||
if (!create_inode(parent_id, name, mode, 0, 0, uid, gid, error))
|
||||
return KResult(error);
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
TmpFSInode::TmpFSInode(TmpFS& fs, InodeMetadata metadata, InodeIdentifier parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue