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