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