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 <k_baldauf@apple.com>
This commit is contained in:
Kathryn Baldauf
2025-10-16 11:52:45 -07:00
committed by GitHub
parent 21d0c799b8
commit a0f860822a
+5 -4
View File
@@ -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)
)
}