2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2025-12-14 15:03:12 +00:00

add split boot partiton support

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2023-02-22 17:26:32 +01:00
committed by Adphi
parent 490f235c6d
commit 532ee3f1a3
11 changed files with 168 additions and 41 deletions

View File

@@ -17,15 +17,18 @@ package d2vm
type ConvertOption func(o *convertOptions)
type convertOptions struct {
size int64
size uint64
password string
output string
cmdLineExtra string
networkManager NetworkManager
raw bool
splitBoot bool
bootSize uint64
}
func WithSize(size int64) ConvertOption {
func WithSize(size uint64) ConvertOption {
return func(o *convertOptions) {
o.size = size
}
@@ -60,3 +63,15 @@ func WithRaw(raw bool) ConvertOption {
o.raw = raw
}
}
func WithSplitBoot(b bool) ConvertOption {
return func(o *convertOptions) {
o.splitBoot = b
}
}
func WithBootSize(bootSize uint64) ConvertOption {
return func(o *convertOptions) {
o.bootSize = bootSize
}
}