update vfkit vendored code

upstream reversed width and height and now we get an unusable gui

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2023-09-29 10:14:49 -05:00
parent cc8c28eb7c
commit 59e0919bc7
6 changed files with 86 additions and 14 deletions

View File

@@ -25,6 +25,7 @@ const (
vfGpu vmComponentKind = "virtiogpu"
vfInput vmComponentKind = "virtioinput"
usbMassStorage vmComponentKind = "usbmassstorage"
rosetta vmComponentKind = "rosetta"
)
type jsonKind struct {
@@ -112,6 +113,10 @@ func unmarshalDevice(rawMsg json.RawMessage) (VirtioDevice, error) {
var newDevice VirtioFs
err = json.Unmarshal(rawMsg, &newDevice)
dev = &newDevice
case rosetta:
var newDevice RosettaShare
err = json.Unmarshal(rawMsg, &newDevice)
dev = &newDevice
case vfRng:
var newDevice VirtioRng
err = json.Unmarshal(rawMsg, &newDevice)
@@ -253,6 +258,17 @@ func (dev *VirtioFs) MarshalJSON() ([]byte, error) {
})
}
func (dev *RosettaShare) MarshalJSON() ([]byte, error) {
type devWithKind struct {
jsonKind
RosettaShare
}
return json.Marshal(devWithKind{
jsonKind: kind(rosetta),
RosettaShare: *dev,
})
}
func (dev *VirtioRng) MarshalJSON() ([]byte, error) {
type devWithKind struct {
jsonKind