From 0e0d7016b3e00dad8c10bc3825b87e9c3e8d39d2 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 17 May 2025 12:39:23 +0300 Subject: [PATCH] Kernel: Rename has_hangup -> has_hungup --- kernel/include/kernel/Device/DebugDevice.h | 2 +- kernel/include/kernel/Device/FramebufferDevice.h | 2 +- kernel/include/kernel/Device/NullDevice.h | 2 +- kernel/include/kernel/Device/RandomDevice.h | 2 +- kernel/include/kernel/Device/ZeroDevice.h | 2 +- kernel/include/kernel/Epoll.h | 2 +- kernel/include/kernel/FS/Ext2/Inode.h | 2 +- kernel/include/kernel/FS/FAT/Inode.h | 2 +- kernel/include/kernel/FS/Inode.h | 4 ++-- kernel/include/kernel/FS/Pipe.h | 2 +- kernel/include/kernel/FS/ProcFS/Inode.h | 4 ++-- kernel/include/kernel/FS/TmpFS/Inode.h | 8 ++++---- kernel/include/kernel/Input/InputDevice.h | 6 +++--- kernel/include/kernel/Networking/E1000/E1000.h | 2 +- kernel/include/kernel/Networking/Loopback.h | 2 +- kernel/include/kernel/Networking/RTL8169/RTL8169.h | 2 +- kernel/include/kernel/Networking/TCPSocket.h | 2 +- kernel/include/kernel/Networking/UDPSocket.h | 2 +- kernel/include/kernel/Networking/UNIX/Socket.h | 2 +- kernel/include/kernel/Storage/NVMe/Controller.h | 2 +- kernel/include/kernel/Storage/Partition.h | 2 +- kernel/include/kernel/Storage/StorageDevice.h | 2 +- kernel/include/kernel/Terminal/PseudoTerminal.h | 4 ++-- kernel/include/kernel/Terminal/TTY.h | 2 +- kernel/kernel/ACPI/BatterySystem.cpp | 2 +- kernel/kernel/Epoll.cpp | 2 +- kernel/kernel/FS/Inode.cpp | 4 ++-- kernel/kernel/Networking/TCPSocket.cpp | 2 +- kernel/kernel/Networking/UNIX/Socket.cpp | 2 +- kernel/kernel/Terminal/TTY.cpp | 2 +- 30 files changed, 39 insertions(+), 39 deletions(-) diff --git a/kernel/include/kernel/Device/DebugDevice.h b/kernel/include/kernel/Device/DebugDevice.h index 074222c1..dbe15df9 100644 --- a/kernel/include/kernel/Device/DebugDevice.h +++ b/kernel/include/kernel/Device/DebugDevice.h @@ -24,7 +24,7 @@ namespace Kernel virtual bool can_read_impl() const override { return false; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: const dev_t m_rdev; diff --git a/kernel/include/kernel/Device/FramebufferDevice.h b/kernel/include/kernel/Device/FramebufferDevice.h index 7c66c5fa..26746cc4 100644 --- a/kernel/include/kernel/Device/FramebufferDevice.h +++ b/kernel/include/kernel/Device/FramebufferDevice.h @@ -38,7 +38,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: FramebufferDevice(mode_t mode, uid_t uid, gid_t gid, dev_t rdev, paddr_t paddr, uint32_t width, uint32_t height, uint32_t pitch, uint8_t bpp); diff --git a/kernel/include/kernel/Device/NullDevice.h b/kernel/include/kernel/Device/NullDevice.h index e305909a..fe213f68 100644 --- a/kernel/include/kernel/Device/NullDevice.h +++ b/kernel/include/kernel/Device/NullDevice.h @@ -26,7 +26,7 @@ namespace Kernel virtual bool can_read_impl() const override { return false; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: const dev_t m_rdev; diff --git a/kernel/include/kernel/Device/RandomDevice.h b/kernel/include/kernel/Device/RandomDevice.h index 9254884d..6b9b552a 100644 --- a/kernel/include/kernel/Device/RandomDevice.h +++ b/kernel/include/kernel/Device/RandomDevice.h @@ -24,7 +24,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: const dev_t m_rdev; diff --git a/kernel/include/kernel/Device/ZeroDevice.h b/kernel/include/kernel/Device/ZeroDevice.h index bd9e3447..e3791d56 100644 --- a/kernel/include/kernel/Device/ZeroDevice.h +++ b/kernel/include/kernel/Device/ZeroDevice.h @@ -24,7 +24,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: const dev_t m_rdev; diff --git a/kernel/include/kernel/Epoll.h b/kernel/include/kernel/Epoll.h index 3ca50374..1af406ee 100644 --- a/kernel/include/kernel/Epoll.h +++ b/kernel/include/kernel/Epoll.h @@ -46,7 +46,7 @@ namespace Kernel bool can_read_impl() const override { return false; } bool can_write_impl() const override { return false; } bool has_error_impl() const override { return false; } - bool has_hangup_impl() const override { return false; } + bool has_hungup_impl() const override { return false; } BAN::ErrorOr fsync_impl() override { return {}; } diff --git a/kernel/include/kernel/FS/Ext2/Inode.h b/kernel/include/kernel/FS/Ext2/Inode.h index 274e9c1f..90ff7baa 100644 --- a/kernel/include/kernel/FS/Ext2/Inode.h +++ b/kernel/include/kernel/FS/Ext2/Inode.h @@ -51,7 +51,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: // Returns maximum number of data blocks in use diff --git a/kernel/include/kernel/FS/FAT/Inode.h b/kernel/include/kernel/FS/FAT/Inode.h index 486e7502..615669d7 100644 --- a/kernel/include/kernel/FS/FAT/Inode.h +++ b/kernel/include/kernel/FS/FAT/Inode.h @@ -49,7 +49,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: FATInode(FATFS& fs, const FAT::DirectoryEntry& entry, ino_t ino, uint32_t block_count) diff --git a/kernel/include/kernel/FS/Inode.h b/kernel/include/kernel/FS/Inode.h index 41ac60b8..580eabac 100644 --- a/kernel/include/kernel/FS/Inode.h +++ b/kernel/include/kernel/FS/Inode.h @@ -124,7 +124,7 @@ namespace Kernel bool can_read() const; bool can_write() const; bool has_error() const; - bool has_hangup() const; + bool has_hungup() const; BAN::ErrorOr ioctl(int request, void* arg); @@ -166,7 +166,7 @@ namespace Kernel virtual bool can_read_impl() const = 0; virtual bool can_write_impl() const = 0; virtual bool has_error_impl() const = 0; - virtual bool has_hangup_impl() const = 0; + virtual bool has_hungup_impl() const = 0; virtual BAN::ErrorOr ioctl_impl(int, void*) { return BAN::Error::from_errno(ENOTSUP); } diff --git a/kernel/include/kernel/FS/Pipe.h b/kernel/include/kernel/FS/Pipe.h index 3058f9c0..a4ac876b 100644 --- a/kernel/include/kernel/FS/Pipe.h +++ b/kernel/include/kernel/FS/Pipe.h @@ -40,7 +40,7 @@ namespace Kernel virtual bool can_read_impl() const override { return m_buffer_size > 0; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return m_writing_count == 0; } + virtual bool has_hungup_impl() const override { return m_writing_count == 0; } private: Pipe(const Credentials&); diff --git a/kernel/include/kernel/FS/ProcFS/Inode.h b/kernel/include/kernel/FS/ProcFS/Inode.h index c3f5f766..adaa49c1 100644 --- a/kernel/include/kernel/FS/ProcFS/Inode.h +++ b/kernel/include/kernel/FS/ProcFS/Inode.h @@ -47,7 +47,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: ProcROProcessInode(Process&, size_t (Process::*)(off_t, BAN::ByteSpan) const, TmpFileSystem&, const TmpInodeInfo&); @@ -73,7 +73,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: ProcROInode(size_t (*callback)(off_t, BAN::ByteSpan), TmpFileSystem&, const TmpInodeInfo&); diff --git a/kernel/include/kernel/FS/TmpFS/Inode.h b/kernel/include/kernel/FS/TmpFS/Inode.h index 2131f2b4..12acf687 100644 --- a/kernel/include/kernel/FS/TmpFS/Inode.h +++ b/kernel/include/kernel/FS/TmpFS/Inode.h @@ -80,7 +80,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: TmpFileInode(TmpFileSystem&, ino_t, const TmpInodeInfo&); @@ -103,7 +103,7 @@ namespace Kernel virtual bool can_read_impl() const override { return false; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: TmpSocketInode(TmpFileSystem&, ino_t, const TmpInodeInfo&); @@ -125,7 +125,7 @@ namespace Kernel virtual bool can_read_impl() const override { return false; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: TmpSymlinkInode(TmpFileSystem&, ino_t, const TmpInodeInfo&); @@ -156,7 +156,7 @@ namespace Kernel virtual bool can_read_impl() const override { return false; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: template diff --git a/kernel/include/kernel/Input/InputDevice.h b/kernel/include/kernel/Input/InputDevice.h index 8c8fa5c5..97e2cc4c 100644 --- a/kernel/include/kernel/Input/InputDevice.h +++ b/kernel/include/kernel/Input/InputDevice.h @@ -31,7 +31,7 @@ namespace Kernel bool can_read_impl() const override { SpinLockGuard _(m_event_lock); return m_event_count > 0; } bool can_write_impl() const override { return false; } bool has_error_impl() const override { return false; } - bool has_hangup_impl() const override { return false; } + bool has_hungup_impl() const override { return false; } private: BAN::ErrorOr read_non_block(BAN::ByteSpan); @@ -73,7 +73,7 @@ namespace Kernel bool can_read_impl() const override; bool can_write_impl() const override { return false; } bool has_error_impl() const override { return false; } - bool has_hangup_impl() const override { return false; } + bool has_hungup_impl() const override { return false; } BAN::StringView name() const final override { return m_name; } dev_t rdev() const final override { return m_rdev; } @@ -100,7 +100,7 @@ namespace Kernel bool can_read_impl() const override; bool can_write_impl() const override { return false; } bool has_error_impl() const override { return false; } - bool has_hangup_impl() const override { return false; } + bool has_hungup_impl() const override { return false; } BAN::StringView name() const final override { return m_name; } dev_t rdev() const final override { return m_rdev; } diff --git a/kernel/include/kernel/Networking/E1000/E1000.h b/kernel/include/kernel/Networking/E1000/E1000.h index f63d1410..967f66b5 100644 --- a/kernel/include/kernel/Networking/E1000/E1000.h +++ b/kernel/include/kernel/Networking/E1000/E1000.h @@ -50,7 +50,7 @@ namespace Kernel virtual bool can_read_impl() const override { return false; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: BAN::ErrorOr read_mac_address(); diff --git a/kernel/include/kernel/Networking/Loopback.h b/kernel/include/kernel/Networking/Loopback.h index a7205cef..289b4796 100644 --- a/kernel/include/kernel/Networking/Loopback.h +++ b/kernel/include/kernel/Networking/Loopback.h @@ -30,7 +30,7 @@ namespace Kernel bool can_read_impl() const override { return false; } bool can_write_impl() const override { return false; } bool has_error_impl() const override { return false; } - bool has_hangup_impl() const override { return false; } + bool has_hungup_impl() const override { return false; } private: SpinLock m_buffer_lock; diff --git a/kernel/include/kernel/Networking/RTL8169/RTL8169.h b/kernel/include/kernel/Networking/RTL8169/RTL8169.h index d3d967be..4bc596f6 100644 --- a/kernel/include/kernel/Networking/RTL8169/RTL8169.h +++ b/kernel/include/kernel/Networking/RTL8169/RTL8169.h @@ -36,7 +36,7 @@ namespace Kernel virtual bool can_read_impl() const override { return false; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: BAN::ErrorOr reset(); diff --git a/kernel/include/kernel/Networking/TCPSocket.h b/kernel/include/kernel/Networking/TCPSocket.h index c6d88a7a..2c49171c 100644 --- a/kernel/include/kernel/Networking/TCPSocket.h +++ b/kernel/include/kernel/Networking/TCPSocket.h @@ -67,7 +67,7 @@ namespace Kernel virtual bool can_read_impl() const override; virtual bool can_write_impl() const override; virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override; + virtual bool has_hungup_impl() const override; private: enum class State diff --git a/kernel/include/kernel/Networking/UDPSocket.h b/kernel/include/kernel/Networking/UDPSocket.h index 256ceb1d..995e6e84 100644 --- a/kernel/include/kernel/Networking/UDPSocket.h +++ b/kernel/include/kernel/Networking/UDPSocket.h @@ -40,7 +40,7 @@ namespace Kernel virtual bool can_read_impl() const override { return !m_packets.empty(); } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: UDPSocket(NetworkLayer&, const Socket::Info&); diff --git a/kernel/include/kernel/Networking/UNIX/Socket.h b/kernel/include/kernel/Networking/UNIX/Socket.h index 6946ba33..92dfff40 100644 --- a/kernel/include/kernel/Networking/UNIX/Socket.h +++ b/kernel/include/kernel/Networking/UNIX/Socket.h @@ -29,7 +29,7 @@ namespace Kernel virtual bool can_read_impl() const override; virtual bool can_write_impl() const override; virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override; + virtual bool has_hungup_impl() const override; private: UnixDomainSocket(Socket::Type, const Socket::Info&); diff --git a/kernel/include/kernel/Storage/NVMe/Controller.h b/kernel/include/kernel/Storage/NVMe/Controller.h index d3862db7..10256858 100644 --- a/kernel/include/kernel/Storage/NVMe/Controller.h +++ b/kernel/include/kernel/Storage/NVMe/Controller.h @@ -27,7 +27,7 @@ namespace Kernel virtual bool can_read_impl() const override { return false; } virtual bool can_write_impl() const override { return false; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: NVMeController(PCI::Device& pci_device); diff --git a/kernel/include/kernel/Storage/Partition.h b/kernel/include/kernel/Storage/Partition.h index 511e9c49..d769c8a9 100644 --- a/kernel/include/kernel/Storage/Partition.h +++ b/kernel/include/kernel/Storage/Partition.h @@ -53,7 +53,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: const dev_t m_rdev; diff --git a/kernel/include/kernel/Storage/StorageDevice.h b/kernel/include/kernel/Storage/StorageDevice.h index 83ae8edd..ab48a63e 100644 --- a/kernel/include/kernel/Storage/StorageDevice.h +++ b/kernel/include/kernel/Storage/StorageDevice.h @@ -47,7 +47,7 @@ namespace Kernel virtual bool can_read_impl() const override { return true; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } private: Mutex m_mutex; diff --git a/kernel/include/kernel/Terminal/PseudoTerminal.h b/kernel/include/kernel/Terminal/PseudoTerminal.h index 0fd1db7e..36b3ef77 100644 --- a/kernel/include/kernel/Terminal/PseudoTerminal.h +++ b/kernel/include/kernel/Terminal/PseudoTerminal.h @@ -29,7 +29,7 @@ namespace Kernel bool can_read_impl() const override { SpinLockGuard _(m_buffer_lock); return m_buffer_size > 0; } bool can_write_impl() const override { SpinLockGuard _(m_buffer_lock); return m_buffer_size < m_buffer->size(); } bool has_error_impl() const override { return false; } - bool has_hangup_impl() const override { return !m_slave.valid(); } + bool has_hungup_impl() const override { return !m_slave.valid(); } BAN::ErrorOr ioctl_impl(int, void*) override; @@ -64,7 +64,7 @@ namespace Kernel protected: bool putchar_impl(uint8_t ch) override; - bool has_hangup_impl() const override { return !m_master.valid(); } + bool has_hungup_impl() const override { return !m_master.valid(); } BAN::ErrorOr ioctl_impl(int, void*) override; diff --git a/kernel/include/kernel/Terminal/TTY.h b/kernel/include/kernel/Terminal/TTY.h index 5a6e9b7c..f1078ab9 100644 --- a/kernel/include/kernel/Terminal/TTY.h +++ b/kernel/include/kernel/Terminal/TTY.h @@ -54,7 +54,7 @@ namespace Kernel virtual bool can_read_impl() const override { return m_output.flush; } virtual bool can_write_impl() const override { return true; } virtual bool has_error_impl() const override { return false; } - virtual bool has_hangup_impl() const override { return false; } + virtual bool has_hungup_impl() const override { return false; } protected: TTY(mode_t mode, uid_t uid, gid_t gid); diff --git a/kernel/kernel/ACPI/BatterySystem.cpp b/kernel/kernel/ACPI/BatterySystem.cpp index 2816a688..b1c44421 100644 --- a/kernel/kernel/ACPI/BatterySystem.cpp +++ b/kernel/kernel/ACPI/BatterySystem.cpp @@ -73,7 +73,7 @@ namespace Kernel::ACPI bool can_read_impl() const override { return true; } bool can_write_impl() const override { return false; } bool has_error_impl() const override { return false; } - bool has_hangup_impl() const override { return false; } + bool has_hungup_impl() const override { return false; } private: BatteryInfoInode(AML::Namespace& acpi_namespace, AML::Scope&& battery_path, AML::NameString&& method, size_t index, ino_t ino, const TmpInodeInfo& info) diff --git a/kernel/kernel/Epoll.cpp b/kernel/kernel/Epoll.cpp index 7ba689f7..a88fcba8 100644 --- a/kernel/kernel/Epoll.cpp +++ b/kernel/kernel/Epoll.cpp @@ -76,7 +76,7 @@ namespace Kernel CHECK_EVENT_BIT(EPOLLIN, can_read); CHECK_EVENT_BIT(EPOLLOUT, can_write); CHECK_EVENT_BIT(EPOLLERR, has_error); - CHECK_EVENT_BIT(EPOLLHUP, has_hangup); + CHECK_EVENT_BIT(EPOLLHUP, has_hungup); #undef CHECK_EVENT_BIT if (events == 0) diff --git a/kernel/kernel/FS/Inode.cpp b/kernel/kernel/FS/Inode.cpp index cbc3f026..ca3af167 100644 --- a/kernel/kernel/FS/Inode.cpp +++ b/kernel/kernel/FS/Inode.cpp @@ -250,10 +250,10 @@ namespace Kernel return has_error_impl(); } - bool Inode::has_hangup() const + bool Inode::has_hungup() const { LockGuard _(m_mutex); - return has_hangup_impl(); + return has_hungup_impl(); } BAN::ErrorOr Inode::ioctl(int request, void* arg) diff --git a/kernel/kernel/Networking/TCPSocket.cpp b/kernel/kernel/Networking/TCPSocket.cpp index 666e71b9..6f1d972d 100644 --- a/kernel/kernel/Networking/TCPSocket.cpp +++ b/kernel/kernel/Networking/TCPSocket.cpp @@ -272,7 +272,7 @@ namespace Kernel return m_send_window.data_size < m_send_window.buffer->size(); } - bool TCPSocket::has_hangup_impl() const + bool TCPSocket::has_hungup_impl() const { return m_has_connected && m_state != State::Established; } diff --git a/kernel/kernel/Networking/UNIX/Socket.cpp b/kernel/kernel/Networking/UNIX/Socket.cpp index aad5e70c..eab89a1b 100644 --- a/kernel/kernel/Networking/UNIX/Socket.cpp +++ b/kernel/kernel/Networking/UNIX/Socket.cpp @@ -301,7 +301,7 @@ namespace Kernel return true; } - bool UnixDomainSocket::has_hangup_impl() const + bool UnixDomainSocket::has_hungup_impl() const { if (m_info.has()) { diff --git a/kernel/kernel/Terminal/TTY.cpp b/kernel/kernel/Terminal/TTY.cpp index f75f8781..230376b1 100644 --- a/kernel/kernel/Terminal/TTY.cpp +++ b/kernel/kernel/Terminal/TTY.cpp @@ -41,7 +41,7 @@ namespace Kernel bool can_read_impl() const override { return false; } bool can_write_impl() const override { return false; } bool has_error_impl() const override { return false; } - bool has_hangup_impl() const override { return false; } + bool has_hungup_impl() const override { return false; } private: DevTTY(mode_t mode, uid_t uid, gid_t gid)