feature-32 #35
3 changed files with 23 additions and 39 deletions
f-32: syntax: fix duplicated code
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
commit
a0637d827a
20
internal/qemu/config.go
Normal file
20
internal/qemu/config.go
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
package qemu
|
||||||
|
|
||||||
|
type DiskConfig struct {
|
||||||
|
Path string
|
||||||
|
Dev string
|
||||||
|
}
|
||||||
|
|
||||||
|
type Config struct {
|
||||||
|
Name string
|
||||||
|
TapID int
|
||||||
|
Mac string
|
||||||
|
Disks []DiskConfig
|
||||||
|
Memory int
|
||||||
|
CPUs int
|
||||||
|
UEFICodePath string
|
||||||
|
UEFIVarsPath string
|
||||||
|
SerialDir string
|
||||||
|
MonitorDir string
|
||||||
|
QMPDir string
|
||||||
|
}
|
||||||
|
|
@ -11,25 +11,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DiskConfig struct {
|
|
||||||
Path string
|
|
||||||
Dev string
|
|
||||||
}
|
|
||||||
|
|
||||||
type Config struct {
|
|
||||||
Name string
|
|
||||||
TapID int
|
|
||||||
Mac string
|
|
||||||
Disks []DiskConfig
|
|
||||||
Memory int
|
|
||||||
CPUs int
|
|
||||||
UEFICodePath string
|
|
||||||
UEFIVarsPath string
|
|
||||||
SerialDir string
|
|
||||||
MonitorDir string
|
|
||||||
QMPDir string
|
|
||||||
}
|
|
||||||
|
|
||||||
func Start(cfg Config) error {
|
func Start(cfg Config) error {
|
||||||
memory := cfg.Memory
|
memory := cfg.Memory
|
||||||
if memory == 0 {
|
if memory == 0 {
|
||||||
|
|
|
||||||
|
|
@ -2,26 +2,9 @@
|
||||||
|
|
||||||
package qemu
|
package qemu
|
||||||
|
|
||||||
import "errors"
|
import (
|
||||||
|
"errors"
|
||||||
type DiskConfig struct {
|
)
|
||||||
Path string
|
|
||||||
Dev string
|
|
||||||
}
|
|
||||||
|
|
||||||
type Config struct {
|
|
||||||
Name string
|
|
||||||
TapID int
|
|
||||||
Mac string
|
|
||||||
Disks []DiskConfig
|
|
||||||
Memory int
|
|
||||||
CPUs int
|
|
||||||
UEFICodePath string
|
|
||||||
UEFIVarsPath string
|
|
||||||
SerialDir string
|
|
||||||
MonitorDir string
|
|
||||||
QMPDir string
|
|
||||||
}
|
|
||||||
|
|
||||||
func Start(_ Config) error {
|
func Start(_ Config) error {
|
||||||
return errors.New("vm: not supported on this platform")
|
return errors.New("vm: not supported on this platform")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue