mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
fix rpcGetUsbEmulationState filepath (#241)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user