From a0f860822a7cc91efc4a0d06236aa1d27881a69b Mon Sep 17 00:00:00 2001 From: Kathryn Baldauf Date: Thu, 16 Oct 2025 11:52:45 -0700 Subject: [PATCH] Allow runtime options for generic mounts (#334) Make generic mounts more flexible by passing in runtime options and making the init function public Signed-off-by: Kathryn Baldauf --- Sources/Containerization/Mount.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Sources/Containerization/Mount.swift b/Sources/Containerization/Mount.swift index 349cb1bf..6aae7f0a 100644 --- a/Sources/Containerization/Mount.swift +++ b/Sources/Containerization/Mount.swift @@ -43,10 +43,10 @@ public struct Mount: Sendable { public enum RuntimeOptions: Sendable { case virtioblk([String]) case virtiofs([String]) - case any + case any([String]) } - init( + public init( type: String, source: String, destination: String, @@ -98,14 +98,15 @@ public struct Mount: Sendable { type: String, source: String, destination: String, - options: [String] = [] + options: [String] = [], + runtimeOptions: [String] = [] ) -> Self { .init( type: type, source: source, destination: destination, options: options, - runtimeOptions: .any + runtimeOptions: .any(runtimeOptions) ) }