From 520b0284d9014ce45d44e79447de8e63c46a0d43 Mon Sep 17 00:00:00 2001 From: vasilito Date: Tue, 28 Jul 2026 12:17:23 +0900 Subject: [PATCH] local/recipes: fix firmware-loader + redbear-greeter compile (full target) - firmware-loader: wrap libc::fcntl in unsafe (E0133); .map(|_|()) so notify_scheme_ready returns Result<(),String> not Result (E0308). - redbear-greeter: log::debug! -> eprintln! (the crate isn't a dep; matches the surrounding eprintln! style) (E0433). Found by --check-sweep on redbear-full. Co-Authored-By: Claude Opus 4.8 (1M context) --- local/recipes/system/firmware-loader/source/src/main.rs | 3 ++- local/recipes/system/redbear-greeter/source/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/local/recipes/system/firmware-loader/source/src/main.rs b/local/recipes/system/firmware-loader/source/src/main.rs index 68b8999355..20b63c1ae8 100644 --- a/local/recipes/system/firmware-loader/source/src/main.rs +++ b/local/recipes/system/firmware-loader/source/src/main.rs @@ -50,7 +50,7 @@ fn get_init_notify_fd() -> Result { .map_err(|_| "INIT_NOTIFY not set".to_string())? .parse() .map_err(|e| format!("INIT_NOTIFY is not a valid fd: {e}"))?; - libc::fcntl(fd, libc::F_SETFD, libc::FD_CLOEXEC); + unsafe { libc::fcntl(fd, libc::F_SETFD, libc::FD_CLOEXEC); } Ok(fd) } @@ -68,6 +68,7 @@ fn notify_scheme_ready(notify_fd: RawFd, socket: &Socket, scheme: &mut FirmwareS &[], ) .map_err(|e| format!("notify init: {e}")) + .map(|_| ()) } #[cfg(target_os = "redox")] diff --git a/local/recipes/system/redbear-greeter/source/src/main.rs b/local/recipes/system/redbear-greeter/source/src/main.rs index 7f9883aad2..fff70d7750 100644 --- a/local/recipes/system/redbear-greeter/source/src/main.rs +++ b/local/recipes/system/redbear-greeter/source/src/main.rs @@ -327,7 +327,7 @@ impl GreeterDaemon { eprintln!("redbear-greeterd: kill failed: {e}"); } match process.wait() { - Ok(status) => log::debug!("redbear-greeterd: child exited with {status}"), + Ok(status) => eprintln!("redbear-greeterd: child exited with {status}"), Err(e) => eprintln!("redbear-greeterd: wait failed: {e}"), } }