Kernel: Make ioctl take unsigned long instead of int

this is what linux does :D

also fix one or two `return ioctl` instead of `return ioctl_impl`
This commit is contained in:
2026-07-07 03:11:16 +03:00
parent ea4e016b1e
commit eee0b7c3ff
24 changed files with 33 additions and 33 deletions

View File

@@ -77,9 +77,9 @@ namespace Kernel
return to_copy;
}
BAN::ErrorOr<long> AudioController::ioctl_impl(int cmd, void* arg)
BAN::ErrorOr<long> AudioController::ioctl_impl(unsigned long request, void* arg)
{
switch (cmd)
switch (request)
{
case SND_GET_CHANNELS:
*static_cast<uint32_t*>(arg) = get_channels();
@@ -92,7 +92,7 @@ namespace Kernel
{
SpinLockGuard _(m_spinlock);
*static_cast<uint32_t*>(arg) = m_sample_data->size();
if (cmd == SND_RESET_BUFFER)
if (request == SND_RESET_BUFFER)
m_sample_data->pop(m_sample_data->size());
return 0;
}
@@ -113,7 +113,7 @@ namespace Kernel
return 0;
}
return CharacterDevice::ioctl_impl(cmd, arg);
return CharacterDevice::ioctl_impl(request, arg);
}
}