All: Clear lines with only whitspace in them

This commit is contained in:
Bananymous
2023-09-09 22:52:03 +03:00
parent d77f455065
commit 720bc418a6
67 changed files with 95 additions and 119 deletions

View File

@@ -12,7 +12,6 @@ namespace Kernel
return BAN::RefPtr<ZeroDevice>::adopt(result);
}
BAN::ErrorOr<size_t> ZeroDevice::read_impl(off_t, void* buffer, size_t bytes)
{
memset(buffer, 0, bytes);

View File

@@ -12,7 +12,7 @@ namespace Kernel
return BAN::Error::from_errno(ENOMEM);
return BAN::RefPtr<Inode>::adopt(pipe);
}
Pipe::Pipe(const Credentials& credentials)
: m_uid(credentials.euid())
, m_gid(credentials.egid())
@@ -29,7 +29,7 @@ namespace Kernel
ASSERT(m_writing_count > 0);
m_writing_count++;
}
void Pipe::close_writing()
{
LockGuard _(m_lock);
@@ -63,7 +63,7 @@ namespace Kernel
return to_copy;
}
BAN::ErrorOr<size_t> Pipe::write_impl(off_t, const void* buffer, size_t count)
{
LockGuard _(m_lock);
@@ -81,5 +81,5 @@ namespace Kernel
return count;
}
}

View File

@@ -6,7 +6,7 @@ namespace Kernel
{
/*
RAM INODE
*/
@@ -68,7 +68,7 @@ namespace Kernel
}
/*
RAM DIRECTORY INODE
*/
@@ -217,7 +217,7 @@ namespace Kernel
}
/*
RAM SYMLINK INODE
*/

View File

@@ -35,7 +35,7 @@ namespace Kernel
auto* tmpfs = MUST(RamFileSystem::create(1024 * 1024, tmpfs_mode, 0, 0));
MUST(s_instance->mount(root_creds, tmpfs, "/tmp"));
}
VirtualFileSystem& VirtualFileSystem::get()
{
ASSERT(s_instance);

View File

@@ -245,7 +245,7 @@ namespace Kernel
result.m_pitch = header.glyph_size / header.height;
return result;
}
bool Font::has_glyph(uint32_t codepoint) const
{
return m_glyph_offsets.contains(codepoint);

View File

@@ -121,7 +121,7 @@ namespace Kernel::Input
}
m_command_queue.push(byte);
}
void PS2Keyboard::append_command_queue(uint8_t byte1, uint8_t byte2)
{
if (m_command_queue.size() + 2 > m_command_queue.capacity())

View File

@@ -59,7 +59,7 @@ namespace Kernel
return page;
return 0;
}
void Heap::release_page(paddr_t addr)
{
LockGuard _(m_lock);

View File

@@ -192,7 +192,7 @@ static void* kmalloc_fixed()
// allocate the node on top of free list
auto* node = info.free_list_head;
ASSERT(node->next == kmalloc_fixed_info::node::invalid);
// remove the node from free list
if (info.free_list_head->prev != kmalloc_fixed_info::node::invalid)
{
@@ -326,7 +326,7 @@ void* kmalloc(size_t size, size_t align, bool force_indentity_map)
if (ptrdiff_t rem = size % s_kmalloc_min_align)
size += s_kmalloc_min_align - rem;
if (void* res = kmalloc_impl(size, align))
return res;

View File

@@ -7,7 +7,6 @@
namespace Kernel
{
OpenFileDescriptorSet::OpenFileDescriptorSet(const Credentials& credentials)
: m_credentials(credentials)
{

View File

@@ -995,7 +995,7 @@ namespace Kernel
auto inode = TRY(m_open_file_descriptors.inode_of(fd));
if (!inode->is_tty())
return BAN::Error::from_errno(ENOTTY);
if ((TTY*)inode.ptr() != m_controlling_terminal.ptr())
return BAN::Error::from_errno(ENOTTY);

View File

@@ -2,13 +2,13 @@
#include <stdint.h>
#include <stdlib.h>
#if UINT32_MAX == UINTPTR_MAX
#define STACK_CHK_GUARD 0xe2dee396
#else
#define STACK_CHK_GUARD 0x595e9fbd94fda766
#endif
uintptr_t __stack_chk_guard = STACK_CHK_GUARD;
__BEGIN_DECLS

View File

@@ -304,7 +304,7 @@ namespace Kernel
execute_current_thread();
ASSERT_NOT_REACHED();
}
void Scheduler::unblock_threads(Semaphore* semaphore)
{
CriticalScope critical;

View File

@@ -323,5 +323,5 @@ namespace Kernel
return {};
}
}

View File

@@ -181,7 +181,7 @@ namespace Kernel
{
return s_has_devices;
}
void Serial::putchar(char c)
{
while (!(IO::inb(m_port + 5) & 0x20))
@@ -275,7 +275,7 @@ namespace Kernel
if (m_serial.port() == COM2_PORT)
update_com(s_com2, s_com2_input);
}
uint32_t SerialTTY::width() const
{
return m_serial.width();
@@ -285,7 +285,7 @@ namespace Kernel
{
return m_serial.height();
}
void SerialTTY::putchar(uint8_t ch)
{
m_serial.putchar(ch);

View File

@@ -57,7 +57,6 @@ VesaTerminalDriver* VesaTerminalDriver::create()
return driver;
}
VesaTerminalDriver::~VesaTerminalDriver()
{
PageTable::kernel().unmap_range(m_address, m_pitch * m_height);

View File

@@ -25,7 +25,6 @@ namespace Kernel
memcpy((void*)rsp, (void*)&value, sizeof(uintptr_t));
}
Thread::TerminateBlocker::TerminateBlocker(Thread& thread)
: m_thread(thread)
{

View File

@@ -47,7 +47,7 @@ namespace Kernel
void PIT::initialize()
{
constexpr uint16_t timer_reload = BASE_FREQUENCY / TICKS_PER_SECOND;
IO::outb(PIT_CTL, SELECT_CHANNEL0 | ACCESS_LO | ACCESS_HI | MODE_SQUARE_WAVE);
IO::outb(TIMER0_CTL, (timer_reload >> 0) & 0xff);

View File

@@ -169,7 +169,7 @@ static void init2(void*)
PCI::initialize();
dprintln("PCI initialized");
VirtualFileSystem::initialize(cmdline.root);
if (auto res = PS2Controller::initialize(); res.is_error())