1
Fork 0
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:
David Isaksson 2021-10-09 11:19:51 +02:00 committed by Andreas Kling
parent 8d631dcd5e
commit b2e57f555b
2 changed files with 7 additions and 0 deletions

View file

@ -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;
}