mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 23:39:20 +00:00
Fix compiler warnings
This commit is contained in:
@ -186,7 +186,9 @@ static uintptr_t sys_kernelctl(SyscallsFrame *Frame, enum KCtl Command, uint64_t
|
||||
|
||||
Execute::SharedLibraries lib = Execute::GetLibrary(Identifier);
|
||||
if (!lib.Address)
|
||||
{
|
||||
debug("Failed to get library address %#lx", (uintptr_t)lib.Address);
|
||||
}
|
||||
|
||||
debug("Returning library address %#lx (%s)", (uintptr_t)lib.Address, Identifier);
|
||||
return (uintptr_t)lib.Address;
|
||||
@ -200,7 +202,9 @@ static uintptr_t sys_kernelctl(SyscallsFrame *Frame, enum KCtl Command, uint64_t
|
||||
Execute::SharedLibraries lib = Execute::GetLibrary(Identifier);
|
||||
|
||||
if (!lib.MemoryImage)
|
||||
{
|
||||
debug("Failed to get library memory image %#lx", (uintptr_t)lib.MemoryImage);
|
||||
}
|
||||
|
||||
debug("Returning memory image %#lx (%s)", (uintptr_t)lib.MemoryImage, Identifier);
|
||||
return (uintptr_t)lib.MemoryImage;
|
||||
@ -252,6 +256,8 @@ static uint64_t sys_file_open(SyscallsFrame *Frame, const char *Path, uint64_t F
|
||||
*KernelPrivate = KPObj;
|
||||
debug("Opened file %s (%d)", KPObj.Name, KPObj.Status);
|
||||
return (uint64_t)KernelPrivate;
|
||||
UNUSED(Frame);
|
||||
UNUSED(Flags);
|
||||
}
|
||||
|
||||
static int sys_file_close(SyscallsFrame *Frame, void *KernelPrivate)
|
||||
@ -266,18 +272,21 @@ static int sys_file_close(SyscallsFrame *Frame, void *KernelPrivate)
|
||||
return SYSCALL_OK;
|
||||
}
|
||||
return SYSCALL_INVALID_ARGUMENT;
|
||||
UNUSED(Frame);
|
||||
}
|
||||
|
||||
static uint64_t sys_file_read(SyscallsFrame *Frame, void *KernelPrivate, uint64_t Offset, uint8_t *Buffer, uint64_t Size)
|
||||
{
|
||||
debug("(KernelPrivate: %#lx, Offset: %#lx, Buffer: %#lx, Size: %#lx)", KernelPrivate, Offset, Buffer, Size);
|
||||
return vfs->Read(*(VirtualFileSystem::File *)KernelPrivate, Offset, Buffer, Size);
|
||||
UNUSED(Frame);
|
||||
}
|
||||
|
||||
static uint64_t sys_file_write(SyscallsFrame *Frame, void *KernelPrivate, uint64_t Offset, uint8_t *Buffer, uint64_t Size)
|
||||
{
|
||||
debug("(KernelPrivate: %#lx, Offset: %#lx, Buffer: %#lx, Size: %#lx)", KernelPrivate, Offset, Buffer, Size);
|
||||
return vfs->Write(*(VirtualFileSystem::File *)KernelPrivate, Offset, Buffer, Size);
|
||||
UNUSED(Frame);
|
||||
}
|
||||
|
||||
static int sys_file_seek(SyscallsFrame *Frame)
|
||||
@ -294,6 +303,7 @@ static int sys_file_status(SyscallsFrame *Frame)
|
||||
|
||||
static int sys_sleep(SyscallsFrame *Frame, uint64_t Milliseconds)
|
||||
{
|
||||
UNUSED(Frame);
|
||||
if (!CheckTrust(TrustedByKernel | Trusted | Untrusted))
|
||||
return SYSCALL_ACCESS_DENIED;
|
||||
TaskManager->Sleep(Milliseconds);
|
||||
|
Reference in New Issue
Block a user