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:
Andrew Kaster 2023-01-07 13:52:06 -07:00 committed by Andrew Kaster
parent ddea37b521
commit 100fb38c3e
23 changed files with 25 additions and 26 deletions

View file

@ -7,9 +7,9 @@
#pragma once
#include <sys/cdefs.h>
__BEGIN_DECLS
#ifdef __cplusplus
extern "C" {
#endif
struct winsize {
unsigned short ws_row;
@ -76,7 +76,9 @@ enum ConsoleModes {
KD_GRAPHICS = 0x01,
};
__END_DECLS
#ifdef __cplusplus
}
#endif
enum IOCtlNumber {
TIOCGPGRP,

View file

@ -4,12 +4,12 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/API/Ioctl.h>
#include <Kernel/Devices/Audio/Management.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Devices/RandomDevice.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -8,10 +8,10 @@
#include <AK/Assertions.h>
#include <AK/Types.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/Devices/HID/KeyboardDevice.h>
#include <Kernel/Sections.h>
#include <Kernel/TTY/VirtualConsole.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -6,11 +6,11 @@
#include <AK/Assertions.h>
#include <AK/NonnullOwnPtr.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Devices/KCOVDevice.h>
#include <Kernel/Devices/KCOVInstance.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <LibC/sys/ioctl_numbers.h>
#include <Kernel/Panic.h>

View file

@ -5,6 +5,7 @@
*/
#include <AK/StringView.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/API/POSIX/errno.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/FileSystem/InodeFile.h>
@ -13,7 +14,6 @@
#include <Kernel/Memory/PrivateInodeVMObject.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Process.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -4,13 +4,13 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/API/Ioctl.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/Directory.h>
#include <Kernel/Graphics/DisplayConnector.h>
#include <Kernel/Graphics/GraphicsManagement.h>
#include <Kernel/Memory/MemoryManager.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -7,9 +7,9 @@
#pragma once
#include <AK/Types.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/Memory/SharedFramebufferVMObject.h>
#include <LibC/sys/ioctl_numbers.h>
#include <LibEDID/EDID.h>
namespace Kernel {

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/API/Ioctl.h>
#include <Kernel/API/VirGL.h>
#include <Kernel/Graphics/GraphicsManagement.h>
#include <Kernel/Graphics/VirtIOGPU/Console.h>
@ -11,7 +12,6 @@
#include <Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h>
#include <Kernel/Graphics/VirtIOGPU/Protocol.h>
#include <Kernel/Random.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -6,6 +6,7 @@
#include <AK/Singleton.h>
#include <AK/StringBuilder.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/API/POSIX/errno.h>
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
@ -22,7 +23,6 @@
#include <Kernel/Net/UDPSocket.h>
#include <Kernel/Process.h>
#include <Kernel/UnixTypes.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -6,6 +6,7 @@
#include <AK/Singleton.h>
#include <AK/StringBuilder.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/API/POSIX/errno.h>
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
@ -16,7 +17,6 @@
#include <Kernel/Process.h>
#include <Kernel/StdLib.h>
#include <Kernel/UnixTypes.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -5,6 +5,7 @@
*/
#include <AK/StringView.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/Debug.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
@ -14,7 +15,6 @@
#include <Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/Directory.h>
#include <Kernel/Storage/StorageDevice.h>
#include <Kernel/Storage/StorageManagement.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -5,9 +5,9 @@
*/
#include <AK/Userspace.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/Process.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -5,11 +5,11 @@
*/
#include <AK/Userspace.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/Jail.h>
#include <Kernel/JailManagement.h>
#include <Kernel/Process.h>
#include <Kernel/StdLib.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/API/Ioctl.h>
#include <Kernel/API/POSIX/errno.h>
#include <Kernel/API/POSIX/signal_numbers.h>
#include <Kernel/Debug.h>
@ -12,7 +13,6 @@
#include <Kernel/TTY/MasterPTY.h>
#include <Kernel/TTY/PTYMultiplexer.h>
#include <Kernel/TTY/SlavePTY.h>
#include <LibC/sys/ioctl_numbers.h>
namespace Kernel {

View file

@ -7,13 +7,13 @@
#include <AK/ScopeGuard.h>
#include <AK/StringView.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/API/POSIX/errno.h>
#include <Kernel/API/POSIX/signal_numbers.h>
#include <Kernel/Debug.h>
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Process.h>
#include <Kernel/TTY/TTY.h>
#include <LibC/sys/ioctl_numbers.h>
#define TTYDEFCHARS
#include <LibC/sys/ttydefaults.h>
#undef TTYDEFCHARS

View file

@ -28,7 +28,6 @@
#include <string.h>
#include <sys/internals.h>
#include <sys/ioctl.h>
#include <sys/ioctl_numbers.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>

View file

@ -6,8 +6,8 @@
#pragma once
#include <Kernel/API/Ioctl.h>
#include <sys/cdefs.h>
#include <sys/ioctl_numbers.h>
__BEGIN_DECLS

View file

@ -8,7 +8,7 @@
#include <AK/StringView.h>
#include <Kernel/API/VirGL.h>
#include <sys/ioctl_numbers.h>
#include <sys/ioctl.h>
#include <LibVirtGPU/CommandBufferBuilder.h>
#include <LibVirtGPU/Commands.h>

View file

@ -13,7 +13,7 @@
#include <LibGfx/Size.h>
#include <LibVirtGPU/Commands.h>
#include <LibVirtGPU/VirGLProtocol.h>
#include <sys/ioctl_numbers.h>
#include <sys/ioctl.h>
namespace VirtGPU {

View file

@ -11,7 +11,7 @@
#include <AK/DeprecatedString.h>
#include <AK/Error.h>
#include <AK/Span.h>
#include <sys/ioctl_numbers.h>
#include <sys/ioctl.h>
namespace WindowServer {
class HardwareScreenBackend : public ScreenBackend {

View file

@ -10,7 +10,7 @@
#include <AK/Error.h>
#include <AK/Span.h>
#include <LibGfx/Color.h>
#include <sys/ioctl_numbers.h>
#include <sys/ioctl.h>
namespace WindowServer {

View file

@ -11,7 +11,6 @@
#include <AK/DeprecatedString.h>
#include <AK/Error.h>
#include <AK/Span.h>
#include <sys/ioctl_numbers.h>
namespace WindowServer {

View file

@ -9,7 +9,6 @@
#include <fcntl.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/ioctl_numbers.h>
#include <sys/kcov.h>
#include <sys/mman.h>
#include <unistd.h>