mirror of
https://github.com/jetkvm/kvm.git
synced 2025-09-16 08:38:14 +00:00
fix rpcGetUsbEmulationState filepath (#241)
This commit is contained in:
parent
1ec87f043f
commit
3b83f4c7a1
@ -517,10 +517,8 @@ func rpcIsUpdatePending() (bool, error) {
|
||||
return IsUpdatePending(), nil
|
||||
}
|
||||
|
||||
var udcFilePath = filepath.Join("/sys/bus/platform/drivers/dwc3", udc)
|
||||
|
||||
func rpcGetUsbEmulationState() (bool, error) {
|
||||
_, err := os.Stat(udcFilePath)
|
||||
_, err := os.Stat(filepath.Join("/sys/bus/platform/drivers/dwc3", udc))
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
|
||||
Loading…
Reference in New Issue
Block a user