patches and low-level development discussion
 help / color / mirror / code / Atom feed
92b34b60276faf1328b1b41ffd5dde3bd4e3f84e blob 788 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 
// SPDX-License-Identifier: EUPL-1.2+
// SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>

use std::env::current_dir;
use std::os::unix::prelude::*;
use std::process::exit;

use start_vm::fs::Root;
use start_vm::{prog_name, vm_command};

const ROOT: &str = "/ext";

fn run() -> String {
    let dir = match current_dir() {
        Ok(dir) => dir,
        Err(e) => return format!("getting current directory: {}", e),
    };

    let config_root = match Root::open(ROOT) {
        Ok(fd) => fd,
        Err(e) => return format!("opening {}: {}", ROOT, e),
    };

    match vm_command(dir, &config_root) {
        Ok(mut command) => format!("failed to exec: {}", command.exec()),
        Err(e) => e,
    }
}

fn main() {
    eprintln!("{}: {}", prog_name(), run());
    exit(1);
}
debug log:

solving 92b34b6 ...
found 92b34b6 in https://spectrum-os.org/lists/archives/spectrum-devel/20221010232909.1953738-16-hi@alyssa.is/
found 4790841 in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100644 4790841a32008353fdcb79a8a3d376ce347ef9e8	host/start-vm/start-vm.rs

applying [1/1] https://spectrum-os.org/lists/archives/spectrum-devel/20221010232909.1953738-16-hi@alyssa.is/
diff --git a/host/start-vm/start-vm.rs b/host/start-vm/start-vm.rs
index 4790841..92b34b6 100644

Checking patch host/start-vm/start-vm.rs...
Applied patch host/start-vm/start-vm.rs cleanly.

index at:
100644 92b34b60276faf1328b1b41ffd5dde3bd4e3f84e	host/start-vm/start-vm.rs

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).