mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
Kernel: Make File::truncate() take a u64
No point in taking a signed type here. We validate at the syscall layer and then pass around a u64 from then on.
This commit is contained in:
@@ -1598,10 +1598,10 @@ KResult Ext2FSInode::chown(uid_t uid, gid_t gid)
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
KResult Ext2FSInode::truncate(off_t size)
|
||||
KResult Ext2FSInode::truncate(u64 size)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
if ((off_t)m_raw_inode.i_size == size)
|
||||
if (static_cast<u64>(m_raw_inode.i_size) == size)
|
||||
return KSuccess;
|
||||
auto result = resize(size);
|
||||
if (result.is_error())
|
||||
|
||||
Reference in New Issue
Block a user