Skip to content

Commit

Permalink
qemu: Add a VGA parameter field to the Config structure
Browse files Browse the repository at this point in the history
The VGA string represents the type of VGA card qemu should emulate.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Samuel Ortiz committed Sep 16, 2016
1 parent 4892d04 commit d94b5af
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions qemu.go
Expand Up @@ -193,6 +193,9 @@ type Config struct {
// RTC is the qemu Real Time Clock configuration
RTC RTC

// VGA is the qemu VGA mode.
VGA string

// UUID is the qemu process UUID.
UUID string

Expand Down Expand Up @@ -445,6 +448,15 @@ func appendGlobalParam(params []string, config Config) []string {
return params
}

func appendVGA(params []string, config Config) []string {
if config.VGA != "" {
params = append(params, "-vga")
params = append(params, config.VGA)
}

return params
}

func appendKernel(params []string, config Config) []string {
if config.Kernel.Path != "" {
params = append(params, "-kernel")
Expand Down Expand Up @@ -485,6 +497,7 @@ func LaunchQemu(config Config, logger QMPLog) (string, error) {
params = appendRTC(params, config)
params = appendKernel(params, config)
params = appendGlobalParam(params, config)
params = appendVGA(params, config)

params = append(params, config.ExtraParams...)

Expand Down

0 comments on commit d94b5af

Please sign in to comment.