mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
feat(usbgadget): suppress duplicate error logs (#630).
This commit is contained in:
@@ -79,6 +79,8 @@ type UsbGadget struct {
|
||||
onKeyboardStateChange *func(state KeyboardState)
|
||||
|
||||
log *zerolog.Logger
|
||||
|
||||
logSuppressionCounter map[string]int
|
||||
}
|
||||
|
||||
const configFSPath = "/sys/kernel/config"
|
||||
@@ -126,6 +128,8 @@ func newUsbGadget(name string, configMap map[string]gadgetConfigItem, enabledDev
|
||||
|
||||
strictMode: config.strictMode,
|
||||
|
||||
logSuppressionCounter: make(map[string]int),
|
||||
|
||||
absMouseAccumulatedWheelY: 0,
|
||||
}
|
||||
if err := g.Init(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user