priv: move shared consts to hive-sh4re; WriteNspawnFlags uses Vec<String> + per-flag validation

This commit is contained in:
damocles 2026-06-01 17:19:39 +02:00 committed by mara
commit aa7f8e5553
3 changed files with 37 additions and 20 deletions

View file

@ -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?)
}