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/wait.h> | ||||||
| #include <sys/mount.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 |  * execute a program from an absolute path | ||||||
|  * |  * | ||||||
| @ -36,20 +46,32 @@ int Pii_ExecuteProgram(const std::string& path) { | |||||||
|  */ |  */ | ||||||
| [[noreturn]] | [[noreturn]] | ||||||
| void Pii_AbortBoot() { | 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"); | 	Pii_ExecuteProgram("/Windows/System32/bash.exe"); | ||||||
| 	std::exit(1); | 	std::exit(1); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int main() { | int main() { | ||||||
| 	// dynamic linking fun
 | 	// -- just print shit --
 | ||||||
| 	std::cout << "Regenerating dynamic linker cache\n"; | 	Pii_Log("Starting Lindows Session Manager Subsystem"); | ||||||
|  | 	 | ||||||
|  | 	// -- dynamic linking fun --
 | ||||||
|  | 	Pii_Log("Regenerating dynamic linker cache"); | ||||||
| 	Pii_ExecuteProgram("/Windows/System32/ldconfig.exe"); | 	Pii_ExecuteProgram("/Windows/System32/ldconfig.exe"); | ||||||
| 
 | 
 | ||||||
| 	// boot still failed
 | 	// -- registry --
 | ||||||
| 	// for (const auto& ent : std::filesystem::directory_iterator("/Windows/System32")) {
 | 	Pii_Log("Starting Lindows Registry Subsystem"); | ||||||
| 	//	std::cout << ent << " s:" << ent.is_symlink() << " d:" << ent.is_directory() << "\n";
 | 	// TODO
 | ||||||
| 	//}
 | 	Pii_Log("Loading Lindows registry"); | ||||||
|  | 	// TODO
 | ||||||
|  | 	 | ||||||
|  | 	// -- swap --
 | ||||||
|  | 	Pii_Log("Creating pagefiles"); | ||||||
|  | 	// TODO
 | ||||||
|  | 	 | ||||||
|  | 	// -- env --
 | ||||||
|  | 	Pii_Log("Setting environment variables"); | ||||||
|  | 	// TODO
 | ||||||
| 	 | 	 | ||||||
| 	// we are never ok
 | 	// we are never ok
 | ||||||
| 	Pii_AbortBoot(); | 	Pii_AbortBoot(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user