Skip to content

Commit

Permalink
Merge pull request #224 from devnexen/code_simpl
Browse files Browse the repository at this point in the history
Code simplifications
  • Loading branch information
arighi authored Feb 12, 2025
2 parents 698d356 + 9faa6c9 commit 687eee6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virtme_ng_init/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ fn mount_virtme_overlays() {
utils::do_mkdir(upperdir);
utils::do_mkdir(workdir);
let result = utils::do_mount_check(&key, &path, "overlay", 0, mnt_opts);
if let Err(_) = result {
if result.is_err() {
// Old kernels don't support xino=on|off, re-try without this option.
let mnt_opts = &format!(
"lowerdir={},upperdir={},workdir={}",
Expand Down Expand Up @@ -800,7 +800,7 @@ fn setup_user_script(uid: u32) {

fn setup_root_home() {
// Set up a basic environment (unless virtme-ng is running as root on the host)
if let Err(_) = env::var("virtme_root_user") {
if env::var("virtme_root_user").is_err() {
utils::do_mkdir("/run/tmp/roothome");
utils::do_mount("/run/tmp/roothome", "/root", "", libc::MS_BIND as usize, "");
env::set_var("HOME", "/run/tmp/roothome");
Expand Down

0 comments on commit 687eee6

Please sign in to comment.