structure lsmss stuff for implementing things idk
This commit is contained in:
parent
ef40041363
commit
e0b69fe182
@ -10,6 +10,16 @@
|
||||
#include <sys/wait.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
/**
|
||||
* 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,20 +46,32 @@ 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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user