mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 23:39:20 +00:00
Rename std functions to match the standard
This commit is contained in:
@ -31,7 +31,7 @@ namespace Execute
|
||||
} InterpreterIPCData;
|
||||
|
||||
/* Passing arguments as a sanity check and debugging. */
|
||||
void ELFInterpreterIPCThread(PCB *Process, char *Path, void *MemoryImage, void *ElfFile, Vector<String> NeededLibraries)
|
||||
void ELFInterpreterIPCThread(PCB *Process, char *Path, void *MemoryImage, void *ElfFile, std::vector<const char *> NeededLibraries)
|
||||
{
|
||||
debug("Interpreter thread started for %s", Path);
|
||||
// Interpreter will create an IPC with token "LOAD".
|
||||
@ -56,7 +56,7 @@ namespace Execute
|
||||
warn("Too many libraries! (max 256)");
|
||||
for (size_t i = 0; i < NeededLibraries.size(); i++)
|
||||
{
|
||||
strcpy(TmpBuffer->Libraries[i].Name, NeededLibraries[i].c_str());
|
||||
strcpy(TmpBuffer->Libraries[i].Name, NeededLibraries[i]);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -66,7 +66,7 @@ namespace Execute
|
||||
debug("MemoryImage: %p", MemoryImage);
|
||||
for (size_t i = 0; i < NeededLibraries.size(); i++)
|
||||
{
|
||||
debug("Library: %s", NeededLibraries[i].c_str());
|
||||
debug("Library: %s", NeededLibraries[i]);
|
||||
}
|
||||
debug("INSIDE DATA");
|
||||
debug("Path: %s", TmpBuffer->Path);
|
||||
@ -93,10 +93,10 @@ namespace Execute
|
||||
}
|
||||
|
||||
PCB *InterpreterTargetProcess;
|
||||
String *InterpreterTargetPath; /* We can't have String as a constructor :( */
|
||||
std::string *InterpreterTargetPath; /* We can't have String as a constructor :( */
|
||||
void *InterpreterMemoryImage;
|
||||
void *InterpreterElfFile;
|
||||
Vector<String> InterpreterNeededLibraries;
|
||||
std::vector<const char *> InterpreterNeededLibraries;
|
||||
void ELFInterpreterThreadWrapper()
|
||||
{
|
||||
ELFInterpreterIPCThread(InterpreterTargetProcess, (char *)InterpreterTargetPath->c_str(), InterpreterMemoryImage, InterpreterElfFile, InterpreterNeededLibraries);
|
||||
@ -111,7 +111,7 @@ namespace Execute
|
||||
cwk_path_get_basename(Path, &BaseName, nullptr);
|
||||
TaskArchitecture Arch = TaskArchitecture::UnknownArchitecture;
|
||||
|
||||
SharedPointer<File> ExFile = vfs->Open(Path);
|
||||
std::shared_ptr<File> ExFile = vfs->Open(Path);
|
||||
|
||||
if (ExFile->Status != FileStatus::OK)
|
||||
{
|
||||
@ -230,7 +230,7 @@ namespace Execute
|
||||
debug("ElfFile: %p ELFHeader: %p", ElfFile, ELFHeader);
|
||||
|
||||
InterpreterTargetProcess = Process;
|
||||
InterpreterTargetPath = new String(Path); /* We store in a String because Path may get changed while outside ELFLoad(). */
|
||||
InterpreterTargetPath = new std::string(Path); /* We store in a String because Path may get changed while outside ELFLoad(). */
|
||||
InterpreterMemoryImage = bl.VirtualMemoryImage;
|
||||
InterpreterElfFile = ElfFile;
|
||||
InterpreterNeededLibraries = bl.NeededLibraries;
|
||||
|
@ -136,8 +136,8 @@ namespace Execute
|
||||
break;
|
||||
}
|
||||
|
||||
String ReqLib = (char *)((uintptr_t)ElfFile + DynamicString->sh_offset + Dynamic[i].d_un.d_val);
|
||||
debug("DT_NEEDED - Name[%ld]: %s", i, ReqLib.c_str());
|
||||
const char *ReqLib = (const char *)((uintptr_t)ElfFile + DynamicString->sh_offset + Dynamic[i].d_un.d_val);
|
||||
debug("DT_NEEDED - Name[%ld]: %s", i, ReqLib);
|
||||
ELFBase.NeededLibraries.push_back(ReqLib);
|
||||
}
|
||||
else if (Dynamic[i].d_tag == DT_NULL)
|
||||
@ -154,7 +154,7 @@ namespace Execute
|
||||
memcpy((void *)InterpreterPath, (uint8_t *)ElfFile + ItrPhdr.p_offset, 256);
|
||||
debug("Interpreter: %s", InterpreterPath);
|
||||
|
||||
SharedPointer<VirtualFileSystem::File> InterpreterFile = vfs->Open(InterpreterPath);
|
||||
std::shared_ptr<VirtualFileSystem::File> InterpreterFile = vfs->Open(InterpreterPath);
|
||||
if (InterpreterFile->Status != VirtualFileSystem::FileStatus::OK)
|
||||
warn("Failed to open interpreter file: %s", InterpreterPath);
|
||||
|
||||
|
@ -207,7 +207,7 @@ namespace Execute
|
||||
}
|
||||
|
||||
/* No need to check if it's valid, the GetBinaryType() call above does that. */
|
||||
SharedPointer<VirtualFileSystem::File> File = vfs->Open(Interpreter);
|
||||
std::shared_ptr<VirtualFileSystem::File> File = vfs->Open(Interpreter);
|
||||
|
||||
Elf64_Ehdr *ELFHeader = (Elf64_Ehdr *)File->node->Address;
|
||||
|
||||
|
@ -21,7 +21,7 @@ NewLock(ExecuteServiceLock);
|
||||
namespace Execute
|
||||
{
|
||||
Memory::MemMgr *mem = nullptr;
|
||||
Vector<SharedLibraries> Libs;
|
||||
std::vector<SharedLibraries> Libs;
|
||||
|
||||
void StartExecuteService()
|
||||
{
|
||||
|
Reference in New Issue
Block a user