Files
RedBear-OS/local/archived/patches-2026-06-migration/base/P19-init-startup-hardening.patch
T
vasilito 89d1306c8d migrate: complete source ownership transition
- Create source symlinks for all 7 core components (kernel, relibc, base,
  bootloader, installer, redoxfs, userutils) pointing at local/sources/
- Create redoxfs and userutils fork repos from frozen 0.1.0 archives
- Fix relibc-tests recipes: replace patch commands with direct fork build
- Archive all 417 patch files to local/archived/patches-2026-06-migration/
- Full AGENTS.md rewrite: remove all 31 remaining stale patch references,
  update DURABILITY POLICY to describe git commit workflow, update WHERE TO
  LOOK table, fix build flow description, replace Recipe Patch Wiring section
  with Recipe Source Configuration
- Zero active patches = [...] arrays remain in any recipe.toml file
- All 13 remaining grep hits for 'patches' are TODO comments in WIP recipes
2026-05-29 22:42:42 +03:00

32 lines
1.7 KiB
Diff

diff --git a/init/src/main.rs b/init/src/main.rs
index 5891b808..b8720e81 100644
--- a/init/src/main.rs
+++ b/init/src/main.rs
@@ -167 +167 @@ fn main() {
- UnitId(entry.file_name().unwrap().to_str().unwrap().to_owned()),
+ UnitId(entry.file_name().map(|n| n.to_str().map(|s| s.to_owned())).flatten().unwrap_or_default()),
@@ -174 +174,3 @@ fn main() {
- libredox::call::setrens(0, 0).expect("init: failed to enter null namespace");
+ if let Err(err) = libredox::call::setrens(0, 0) {
+ init_warn(&format!("init: failed to enter null namespace: {} — continuing", err));
+ }
diff --git a/init/src/service.rs b/init/src/service.rs
index 10bb9d8a..970c0338 100644
--- a/init/src/service.rs
+++ b/init/src/service.rs
@@ -178,3 +178,11 @@ impl Service {
- let current_namespace_fd = libredox::call::getns().expect("TODO");
- libredox::call::register_scheme_to_ns(current_namespace_fd, scheme, new_fd)
- .expect("TODO");
+ let current_namespace_fd = match libredox::call::getns() {
+ Ok(fd) => fd,
+ Err(err) => {
+ init_error(&format!("failed to get namespace for {:?}: {}", command, err));
+ return Some(child.id());
+ }
+ };
+ if let Err(err) = libredox::call::register_scheme_to_ns(current_namespace_fd, scheme, new_fd) {
+ init_error(&format!("failed to register scheme {:?} for {:?}: {}", scheme, command, err));
+ return Some(child.id());
+ }