From b3736c1b1e8c1cd0263515c79aa323de1aae07ed Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 23 May 2020 13:17:58 +0200 Subject: Kernel: Use a FlatPtr for the "argument" to ioctl() Since it's often used to pass pointers, it should really be a FlatPtr. --- Kernel/Devices/BXVGADevice.cpp | 2 +- Kernel/Devices/BXVGADevice.h | 2 +- Kernel/Devices/MBVGADevice.cpp | 2 +- Kernel/Devices/MBVGADevice.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Kernel/Devices') diff --git a/Kernel/Devices/BXVGADevice.cpp b/Kernel/Devices/BXVGADevice.cpp index 88c0a6c91c..bf99ad094e 100644 --- a/Kernel/Devices/BXVGADevice.cpp +++ b/Kernel/Devices/BXVGADevice.cpp @@ -192,7 +192,7 @@ KResultOr BXVGADevice::mmap(Process& process, FileDescription&, Virtual return region; } -int BXVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg) +int BXVGADevice::ioctl(FileDescription&, unsigned request, FlatPtr arg) { REQUIRE_PROMISE(video); switch (request) { diff --git a/Kernel/Devices/BXVGADevice.h b/Kernel/Devices/BXVGADevice.h index ccda371376..948141da3d 100644 --- a/Kernel/Devices/BXVGADevice.h +++ b/Kernel/Devices/BXVGADevice.h @@ -40,7 +40,7 @@ public: BXVGADevice(); - virtual int ioctl(FileDescription&, unsigned request, unsigned arg) override; + virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg) override; virtual KResultOr mmap(Process&, FileDescription&, VirtualAddress preferred_vaddr, size_t offset, size_t, int prot, bool shared) override; private: diff --git a/Kernel/Devices/MBVGADevice.cpp b/Kernel/Devices/MBVGADevice.cpp index 989dbe6681..4f1435c9a6 100644 --- a/Kernel/Devices/MBVGADevice.cpp +++ b/Kernel/Devices/MBVGADevice.cpp @@ -73,7 +73,7 @@ KResultOr MBVGADevice::mmap(Process& process, FileDescription&, Virtual return region; } -int MBVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg) +int MBVGADevice::ioctl(FileDescription&, unsigned request, FlatPtr arg) { REQUIRE_PROMISE(video); switch (request) { diff --git a/Kernel/Devices/MBVGADevice.h b/Kernel/Devices/MBVGADevice.h index ca2254fe53..3e911e8615 100644 --- a/Kernel/Devices/MBVGADevice.h +++ b/Kernel/Devices/MBVGADevice.h @@ -40,7 +40,7 @@ public: MBVGADevice(PhysicalAddress addr, size_t pitch, size_t width, size_t height); - virtual int ioctl(FileDescription&, unsigned request, unsigned arg) override; + virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg) override; virtual KResultOr mmap(Process&, FileDescription&, VirtualAddress preferred_vaddr, size_t offset, size_t, int prot, bool shared) override; private: -- cgit v1.2.3