mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 08:47:56 +00:00
Having separate structures for the qemu driver definitions and each possible device definitions is confusing and error prone as one needs to be very careful using matching IDs and names in both structures. As the driver parameter can be derived from the device ones, this patch changes the Device and Driver structures to be linked together, i.e. each driver needs to have its corresponding device. For example this allows us to build the following 9pfs qemu parameters: "-fsdev local,id=foo,path=/bar/foo,security-model=none -device virtio-9p-pci,fsdev=foo,mount_tag=rootfs" from these structures: fsdev := FSDevice{ Driver: Local, ID: "foo", Path: "/bar/foo", MountTag: "rootfs", SecurityModel: None, } driver := Driver{ Driver: Virtio9P, Device: fsdev, } Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> |
||
---|---|---|
examples_test.go | ||
qemu_test.go | ||
qemu.go | ||
qmp_test.go | ||
qmp.go |