From e0b69fe1823b9f6a3d5b05fc66083a7a6e75de0a Mon Sep 17 00:00:00 2001 From: xwashere Date: Tue, 5 Mar 2024 09:17:09 -0500 Subject: [PATCH] structure lsmss stuff for implementing things idk --- lsmss/main.cxx | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/lsmss/main.cxx b/lsmss/main.cxx index fec1dee..50902ee 100644 --- a/lsmss/main.cxx +++ b/lsmss/main.cxx @@ -10,6 +10,16 @@ #include #include +/** + * Log something. + * + * \param message to log + */ +void Pii_Log(const std::string& message) { + std::cout << message << "\n"; + return; +} + /** * execute a program from an absolute path * @@ -36,21 +46,33 @@ int Pii_ExecuteProgram(const std::string& path) { */ [[noreturn]] void Pii_AbortBoot() { - std::cout << "Unable to complete preinitialization. You have been dropped into a minimal recovery environment. Good luck." << std::endl; + Pii_Log("Unable to complete preinitialization. You have been dropped into a minimal recovery environment. Good luck."); Pii_ExecuteProgram("/Windows/System32/bash.exe"); std::exit(1); } int main() { - // dynamic linking fun - std::cout << "Regenerating dynamic linker cache\n"; + // -- just print shit -- + Pii_Log("Starting Lindows Session Manager Subsystem"); + + // -- dynamic linking fun -- + Pii_Log("Regenerating dynamic linker cache"); Pii_ExecuteProgram("/Windows/System32/ldconfig.exe"); - // boot still failed - // for (const auto& ent : std::filesystem::directory_iterator("/Windows/System32")) { - // std::cout << ent << " s:" << ent.is_symlink() << " d:" << ent.is_directory() << "\n"; - //} - + // -- registry -- + Pii_Log("Starting Lindows Registry Subsystem"); + // TODO + Pii_Log("Loading Lindows registry"); + // TODO + + // -- swap -- + Pii_Log("Creating pagefiles"); + // TODO + + // -- env -- + Pii_Log("Setting environment variables"); + // TODO + // we are never ok Pii_AbortBoot();