mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:32:45 +00:00 
			
		
		
		
	Kernel+Userland: Move LibC/sys/ioctl_numbers to Kernel/API/Ioctl.h
This header has always been fundamentally a Kernel API file. Move it where it belongs. Include it directly in Kernel files, and make Userland applications include it via sys/ioctl.h rather than directly.
This commit is contained in:
		
							parent
							
								
									ddea37b521
								
							
						
					
					
						commit
						100fb38c3e
					
				
					 23 changed files with 25 additions and 26 deletions
				
			
		|  | @ -7,9 +7,9 @@ | ||||||
| 
 | 
 | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include <sys/cdefs.h> | #ifdef __cplusplus | ||||||
| 
 | extern "C" { | ||||||
| __BEGIN_DECLS | #endif | ||||||
| 
 | 
 | ||||||
| struct winsize { | struct winsize { | ||||||
|     unsigned short ws_row; |     unsigned short ws_row; | ||||||
|  | @ -76,7 +76,9 @@ enum ConsoleModes { | ||||||
|     KD_GRAPHICS = 0x01, |     KD_GRAPHICS = 0x01, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| __END_DECLS | #ifdef __cplusplus | ||||||
|  | } | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| enum IOCtlNumber { | enum IOCtlNumber { | ||||||
|     TIOCGPGRP, |     TIOCGPGRP, | ||||||
|  | @ -4,12 +4,12 @@ | ||||||
|  * SPDX-License-Identifier: BSD-2-Clause |  * SPDX-License-Identifier: BSD-2-Clause | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/Devices/Audio/Management.h> | #include <Kernel/Devices/Audio/Management.h> | ||||||
| #include <Kernel/Devices/DeviceManagement.h> | #include <Kernel/Devices/DeviceManagement.h> | ||||||
| #include <Kernel/Devices/RandomDevice.h> | #include <Kernel/Devices/RandomDevice.h> | ||||||
| #include <Kernel/Random.h> | #include <Kernel/Random.h> | ||||||
| #include <Kernel/Sections.h> | #include <Kernel/Sections.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -8,10 +8,10 @@ | ||||||
| 
 | 
 | ||||||
| #include <AK/Assertions.h> | #include <AK/Assertions.h> | ||||||
| #include <AK/Types.h> | #include <AK/Types.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/Devices/HID/KeyboardDevice.h> | #include <Kernel/Devices/HID/KeyboardDevice.h> | ||||||
| #include <Kernel/Sections.h> | #include <Kernel/Sections.h> | ||||||
| #include <Kernel/TTY/VirtualConsole.h> | #include <Kernel/TTY/VirtualConsole.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -6,11 +6,11 @@ | ||||||
| 
 | 
 | ||||||
| #include <AK/Assertions.h> | #include <AK/Assertions.h> | ||||||
| #include <AK/NonnullOwnPtr.h> | #include <AK/NonnullOwnPtr.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/Devices/DeviceManagement.h> | #include <Kernel/Devices/DeviceManagement.h> | ||||||
| #include <Kernel/Devices/KCOVDevice.h> | #include <Kernel/Devices/KCOVDevice.h> | ||||||
| #include <Kernel/Devices/KCOVInstance.h> | #include <Kernel/Devices/KCOVInstance.h> | ||||||
| #include <Kernel/FileSystem/OpenFileDescription.h> | #include <Kernel/FileSystem/OpenFileDescription.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| #include <Kernel/Panic.h> | #include <Kernel/Panic.h> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,6 +5,7 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include <AK/StringView.h> | #include <AK/StringView.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/API/POSIX/errno.h> | #include <Kernel/API/POSIX/errno.h> | ||||||
| #include <Kernel/FileSystem/Inode.h> | #include <Kernel/FileSystem/Inode.h> | ||||||
| #include <Kernel/FileSystem/InodeFile.h> | #include <Kernel/FileSystem/InodeFile.h> | ||||||
|  | @ -13,7 +14,6 @@ | ||||||
| #include <Kernel/Memory/PrivateInodeVMObject.h> | #include <Kernel/Memory/PrivateInodeVMObject.h> | ||||||
| #include <Kernel/Memory/SharedInodeVMObject.h> | #include <Kernel/Memory/SharedInodeVMObject.h> | ||||||
| #include <Kernel/Process.h> | #include <Kernel/Process.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,13 +4,13 @@ | ||||||
|  * SPDX-License-Identifier: BSD-2-Clause |  * SPDX-License-Identifier: BSD-2-Clause | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/CharacterDevicesDirectory.h> | #include <Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/CharacterDevicesDirectory.h> | ||||||
| #include <Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceDirectory.h> | #include <Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceDirectory.h> | ||||||
| #include <Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/Directory.h> | #include <Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/Directory.h> | ||||||
| #include <Kernel/Graphics/DisplayConnector.h> | #include <Kernel/Graphics/DisplayConnector.h> | ||||||
| #include <Kernel/Graphics/GraphicsManagement.h> | #include <Kernel/Graphics/GraphicsManagement.h> | ||||||
| #include <Kernel/Memory/MemoryManager.h> | #include <Kernel/Memory/MemoryManager.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -7,9 +7,9 @@ | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include <AK/Types.h> | #include <AK/Types.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/Devices/CharacterDevice.h> | #include <Kernel/Devices/CharacterDevice.h> | ||||||
| #include <Kernel/Memory/SharedFramebufferVMObject.h> | #include <Kernel/Memory/SharedFramebufferVMObject.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| #include <LibEDID/EDID.h> | #include <LibEDID/EDID.h> | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
|  |  | ||||||
|  | @ -4,6 +4,7 @@ | ||||||
|  * SPDX-License-Identifier: BSD-2-Clause |  * SPDX-License-Identifier: BSD-2-Clause | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/API/VirGL.h> | #include <Kernel/API/VirGL.h> | ||||||
| #include <Kernel/Graphics/GraphicsManagement.h> | #include <Kernel/Graphics/GraphicsManagement.h> | ||||||
| #include <Kernel/Graphics/VirtIOGPU/Console.h> | #include <Kernel/Graphics/VirtIOGPU/Console.h> | ||||||
|  | @ -11,7 +12,6 @@ | ||||||
| #include <Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h> | #include <Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h> | ||||||
| #include <Kernel/Graphics/VirtIOGPU/Protocol.h> | #include <Kernel/Graphics/VirtIOGPU/Protocol.h> | ||||||
| #include <Kernel/Random.h> | #include <Kernel/Random.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -6,6 +6,7 @@ | ||||||
| 
 | 
 | ||||||
| #include <AK/Singleton.h> | #include <AK/Singleton.h> | ||||||
| #include <AK/StringBuilder.h> | #include <AK/StringBuilder.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/API/POSIX/errno.h> | #include <Kernel/API/POSIX/errno.h> | ||||||
| #include <Kernel/Debug.h> | #include <Kernel/Debug.h> | ||||||
| #include <Kernel/FileSystem/OpenFileDescription.h> | #include <Kernel/FileSystem/OpenFileDescription.h> | ||||||
|  | @ -22,7 +23,6 @@ | ||||||
| #include <Kernel/Net/UDPSocket.h> | #include <Kernel/Net/UDPSocket.h> | ||||||
| #include <Kernel/Process.h> | #include <Kernel/Process.h> | ||||||
| #include <Kernel/UnixTypes.h> | #include <Kernel/UnixTypes.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -6,6 +6,7 @@ | ||||||
| 
 | 
 | ||||||
| #include <AK/Singleton.h> | #include <AK/Singleton.h> | ||||||
| #include <AK/StringBuilder.h> | #include <AK/StringBuilder.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/API/POSIX/errno.h> | #include <Kernel/API/POSIX/errno.h> | ||||||
| #include <Kernel/Debug.h> | #include <Kernel/Debug.h> | ||||||
| #include <Kernel/FileSystem/OpenFileDescription.h> | #include <Kernel/FileSystem/OpenFileDescription.h> | ||||||
|  | @ -16,7 +17,6 @@ | ||||||
| #include <Kernel/Process.h> | #include <Kernel/Process.h> | ||||||
| #include <Kernel/StdLib.h> | #include <Kernel/StdLib.h> | ||||||
| #include <Kernel/UnixTypes.h> | #include <Kernel/UnixTypes.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,6 +5,7 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include <AK/StringView.h> | #include <AK/StringView.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/Debug.h> | #include <Kernel/Debug.h> | ||||||
| #include <Kernel/Devices/DeviceManagement.h> | #include <Kernel/Devices/DeviceManagement.h> | ||||||
| #include <Kernel/FileSystem/OpenFileDescription.h> | #include <Kernel/FileSystem/OpenFileDescription.h> | ||||||
|  | @ -14,7 +15,6 @@ | ||||||
| #include <Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/Directory.h> | #include <Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/Directory.h> | ||||||
| #include <Kernel/Storage/StorageDevice.h> | #include <Kernel/Storage/StorageDevice.h> | ||||||
| #include <Kernel/Storage/StorageManagement.h> | #include <Kernel/Storage/StorageManagement.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,9 +5,9 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include <AK/Userspace.h> | #include <AK/Userspace.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/FileSystem/OpenFileDescription.h> | #include <Kernel/FileSystem/OpenFileDescription.h> | ||||||
| #include <Kernel/Process.h> | #include <Kernel/Process.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,11 +5,11 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include <AK/Userspace.h> | #include <AK/Userspace.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/Jail.h> | #include <Kernel/Jail.h> | ||||||
| #include <Kernel/JailManagement.h> | #include <Kernel/JailManagement.h> | ||||||
| #include <Kernel/Process.h> | #include <Kernel/Process.h> | ||||||
| #include <Kernel/StdLib.h> | #include <Kernel/StdLib.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,6 +4,7 @@ | ||||||
|  * SPDX-License-Identifier: BSD-2-Clause |  * SPDX-License-Identifier: BSD-2-Clause | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/API/POSIX/errno.h> | #include <Kernel/API/POSIX/errno.h> | ||||||
| #include <Kernel/API/POSIX/signal_numbers.h> | #include <Kernel/API/POSIX/signal_numbers.h> | ||||||
| #include <Kernel/Debug.h> | #include <Kernel/Debug.h> | ||||||
|  | @ -12,7 +13,6 @@ | ||||||
| #include <Kernel/TTY/MasterPTY.h> | #include <Kernel/TTY/MasterPTY.h> | ||||||
| #include <Kernel/TTY/PTYMultiplexer.h> | #include <Kernel/TTY/PTYMultiplexer.h> | ||||||
| #include <Kernel/TTY/SlavePTY.h> | #include <Kernel/TTY/SlavePTY.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace Kernel { | namespace Kernel { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -7,13 +7,13 @@ | ||||||
| 
 | 
 | ||||||
| #include <AK/ScopeGuard.h> | #include <AK/ScopeGuard.h> | ||||||
| #include <AK/StringView.h> | #include <AK/StringView.h> | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <Kernel/API/POSIX/errno.h> | #include <Kernel/API/POSIX/errno.h> | ||||||
| #include <Kernel/API/POSIX/signal_numbers.h> | #include <Kernel/API/POSIX/signal_numbers.h> | ||||||
| #include <Kernel/Debug.h> | #include <Kernel/Debug.h> | ||||||
| #include <Kernel/InterruptDisabler.h> | #include <Kernel/InterruptDisabler.h> | ||||||
| #include <Kernel/Process.h> | #include <Kernel/Process.h> | ||||||
| #include <Kernel/TTY/TTY.h> | #include <Kernel/TTY/TTY.h> | ||||||
| #include <LibC/sys/ioctl_numbers.h> |  | ||||||
| #define TTYDEFCHARS | #define TTYDEFCHARS | ||||||
| #include <LibC/sys/ttydefaults.h> | #include <LibC/sys/ttydefaults.h> | ||||||
| #undef TTYDEFCHARS | #undef TTYDEFCHARS | ||||||
|  |  | ||||||
|  | @ -28,7 +28,6 @@ | ||||||
| #include <string.h> | #include <string.h> | ||||||
| #include <sys/internals.h> | #include <sys/internals.h> | ||||||
| #include <sys/ioctl.h> | #include <sys/ioctl.h> | ||||||
| #include <sys/ioctl_numbers.h> |  | ||||||
| #include <sys/mman.h> | #include <sys/mman.h> | ||||||
| #include <sys/stat.h> | #include <sys/stat.h> | ||||||
| #include <sys/sysmacros.h> | #include <sys/sysmacros.h> | ||||||
|  |  | ||||||
|  | @ -6,8 +6,8 @@ | ||||||
| 
 | 
 | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
|  | #include <Kernel/API/Ioctl.h> | ||||||
| #include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||||
| #include <sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| __BEGIN_DECLS | __BEGIN_DECLS | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ | ||||||
| 
 | 
 | ||||||
| #include <AK/StringView.h> | #include <AK/StringView.h> | ||||||
| #include <Kernel/API/VirGL.h> | #include <Kernel/API/VirGL.h> | ||||||
| #include <sys/ioctl_numbers.h> | #include <sys/ioctl.h> | ||||||
| 
 | 
 | ||||||
| #include <LibVirtGPU/CommandBufferBuilder.h> | #include <LibVirtGPU/CommandBufferBuilder.h> | ||||||
| #include <LibVirtGPU/Commands.h> | #include <LibVirtGPU/Commands.h> | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ | ||||||
| #include <LibGfx/Size.h> | #include <LibGfx/Size.h> | ||||||
| #include <LibVirtGPU/Commands.h> | #include <LibVirtGPU/Commands.h> | ||||||
| #include <LibVirtGPU/VirGLProtocol.h> | #include <LibVirtGPU/VirGLProtocol.h> | ||||||
| #include <sys/ioctl_numbers.h> | #include <sys/ioctl.h> | ||||||
| 
 | 
 | ||||||
| namespace VirtGPU { | namespace VirtGPU { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ | ||||||
| #include <AK/DeprecatedString.h> | #include <AK/DeprecatedString.h> | ||||||
| #include <AK/Error.h> | #include <AK/Error.h> | ||||||
| #include <AK/Span.h> | #include <AK/Span.h> | ||||||
| #include <sys/ioctl_numbers.h> | #include <sys/ioctl.h> | ||||||
| 
 | 
 | ||||||
| namespace WindowServer { | namespace WindowServer { | ||||||
| class HardwareScreenBackend : public ScreenBackend { | class HardwareScreenBackend : public ScreenBackend { | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ | ||||||
| #include <AK/Error.h> | #include <AK/Error.h> | ||||||
| #include <AK/Span.h> | #include <AK/Span.h> | ||||||
| #include <LibGfx/Color.h> | #include <LibGfx/Color.h> | ||||||
| #include <sys/ioctl_numbers.h> | #include <sys/ioctl.h> | ||||||
| 
 | 
 | ||||||
| namespace WindowServer { | namespace WindowServer { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -11,7 +11,6 @@ | ||||||
| #include <AK/DeprecatedString.h> | #include <AK/DeprecatedString.h> | ||||||
| #include <AK/Error.h> | #include <AK/Error.h> | ||||||
| #include <AK/Span.h> | #include <AK/Span.h> | ||||||
| #include <sys/ioctl_numbers.h> |  | ||||||
| 
 | 
 | ||||||
| namespace WindowServer { | namespace WindowServer { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -9,7 +9,6 @@ | ||||||
| #include <fcntl.h> | #include <fcntl.h> | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <sys/ioctl.h> | #include <sys/ioctl.h> | ||||||
| #include <sys/ioctl_numbers.h> |  | ||||||
| #include <sys/kcov.h> | #include <sys/kcov.h> | ||||||
| #include <sys/mman.h> | #include <sys/mman.h> | ||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew Kaster
						Andrew Kaster