priv: move shared consts to hive-sh4re; WriteNspawnFlags uses Vec<String> + per-flag validation
This commit is contained in:
parent
89d0937473
commit
aa7f8e5553
3 changed files with 37 additions and 20 deletions
|
|
@ -59,10 +59,10 @@ pub async fn list_containers() -> Result<String> {
|
|||
Ok(stdout)
|
||||
}
|
||||
|
||||
pub async fn write_nspawn_flags(container: &str, extra_nspawn_flags: &str) -> Result<()> {
|
||||
pub async fn write_nspawn_flags(container: &str, extra_nspawn_flags: &[&str]) -> Result<()> {
|
||||
ok(call(&PrivRequest::WriteNspawnFlags {
|
||||
container: container.to_owned(),
|
||||
extra_nspawn_flags: extra_nspawn_flags.to_owned(),
|
||||
extra_nspawn_flags: extra_nspawn_flags.iter().map(|s| s.to_string()).collect(),
|
||||
}).await?)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue