mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 23:39:02 +00:00
Add chown() syscall and a simple /bin/chown program.
This commit is contained in:
parent
711e2b2651
commit
1d2529b4a1
Notes:
sideshowbarker
2024-07-19 15:36:58 +09:00
Author: https://github.com/awesomekling
Commit: 1d2529b4a1
19 changed files with 130 additions and 5 deletions
|
@ -1346,6 +1346,17 @@ KResult Ext2FSInode::chmod(mode_t mode)
|
|||
return KSuccess;
|
||||
}
|
||||
|
||||
KResult Ext2FSInode::chown(uid_t uid, gid_t gid)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
if (m_raw_inode.i_uid == uid && m_raw_inode.i_gid == gid)
|
||||
return KSuccess;
|
||||
m_raw_inode.i_uid = uid;
|
||||
m_raw_inode.i_gid = gid;
|
||||
set_metadata_dirty(true);
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
unsigned Ext2FS::total_block_count() const
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue