mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
fix(usb_config): check if usb_config is defined in kvm_config.json
This commit is contained in:
@@ -540,12 +540,12 @@ func rpcSetUsbEmulationState(enabled bool) error {
|
||||
|
||||
func rpcGetUsbConfig() (UsbConfig, error) {
|
||||
LoadConfig()
|
||||
return config.UsbConfig, nil
|
||||
return *config.UsbConfig, nil
|
||||
}
|
||||
|
||||
func rpcSetUsbConfig(usbConfig UsbConfig) error {
|
||||
LoadConfig()
|
||||
config.UsbConfig = usbConfig
|
||||
config.UsbConfig = &usbConfig
|
||||
|
||||
err := UpdateGadgetConfig()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user