diff options
Diffstat (limited to 'init')
| -rw-r--r-- | init/src/host/locale.rs | 2 | ||||
| -rw-r--r-- | init/src/kmods/load.rs | 2 | ||||
| -rw-r--r-- | init/src/services/units.rs | 2 | ||||
| -rw-r--r-- | init/src/signals/sigchld.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/init/src/host/locale.rs b/init/src/host/locale.rs index 9ce0a3c..a440792 100644 --- a/init/src/host/locale.rs +++ b/init/src/host/locale.rs @@ -1,7 +1,7 @@ // NOTE: Ts file contains setting localisation by environment variables // Main logic implemented but how i think it can contain with broken logic or checks // At least if check failed it set C.UTF8 (fallback locale) -// And why is std::env::set_var unsafe???? + use crate::host::timezone::set_timezone; use crate::log::{log_success, log_warning}; diff --git a/init/src/kmods/load.rs b/init/src/kmods/load.rs index 8ff0a59..164d429 100644 --- a/init/src/kmods/load.rs +++ b/init/src/kmods/load.rs @@ -1,4 +1,4 @@ -use liblmod::{modprobe, Selection}; +use liblmod::{Selection, modprobe}; use std::fs; fn parse_modules() -> Result<Vec<String>, Box<dyn std::error::Error>> { diff --git a/init/src/services/units.rs b/init/src/services/units.rs index ffb7900..316a15e 100644 --- a/init/src/services/units.rs +++ b/init/src/services/units.rs @@ -139,7 +139,7 @@ pub fn services_mainloop() -> Result<(), Box<dyn std::error::Error + Send>> { )); // Stops other runlevel services - pids.retain(|(child, exec, _, _)| { + pids.retain_mut(|(child, exec, _, _)| { // TODO: Correct stop with SIGTERM + timeout match child.try_wait() { Ok(Some(_)) => { diff --git a/init/src/signals/sigchld.rs b/init/src/signals/sigchld.rs index 79a40c9..d4e3312 100644 --- a/init/src/signals/sigchld.rs +++ b/init/src/signals/sigchld.rs @@ -32,7 +32,7 @@ pub fn setup_sigchld_handler() -> Result<(), Box<dyn std::error::Error>> { unsafe { let mut sigact: sigaction = std::mem::zeroed(); - sigact.sa_sigaction = sigchld_handler as usize; + sigact.sa_sigaction = sigchld_handler as *const () as usize; sigact.sa_flags = SA_RESTART | SA_SIGINFO; libc::sigemptyset(&mut sigact.sa_mask as *mut sigset_t); |
