mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +00:00
Kernel: Use u64 instead of size_t in the STORAGE_DEVICE_GET_SIZE ioctl
This ensures the device size doesn't get truncated on i686.
This commit is contained in:
parent
d1ed554dc8
commit
971ab3b919
2 changed files with 3 additions and 4 deletions
|
@ -189,8 +189,8 @@ ErrorOr<void> StorageDevice::ioctl(OpenFileDescription&, unsigned request, Users
|
|||
{
|
||||
switch (request) {
|
||||
case STORAGE_DEVICE_GET_SIZE: {
|
||||
size_t disk_size = m_max_addressable_block * block_size();
|
||||
return copy_to_user(static_ptr_cast<size_t*>(arg), &disk_size);
|
||||
u64 disk_size = m_max_addressable_block * block_size();
|
||||
return copy_to_user(static_ptr_cast<u64*>(arg), &disk_size);
|
||||
break;
|
||||
}
|
||||
case STORAGE_DEVICE_GET_BLOCK_SIZE: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue