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