mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
Kernel: Add ioctl request for getting a storage device's block size
This commit is contained in:
parent
8d631dcd5e
commit
b2e57f555b
2 changed files with 7 additions and 0 deletions
|
@ -196,6 +196,11 @@ KResult StorageDevice::ioctl(OpenFileDescription&, unsigned request, Userspace<v
|
|||
return copy_to_user(Userspace<size_t*>(arg), &disk_size);
|
||||
break;
|
||||
}
|
||||
case STORAGE_DEVICE_GET_BLOCK_SIZE: {
|
||||
size_t size = block_size();
|
||||
return copy_to_user(Userspace<size_t*>(arg), &size);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue