Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Yu <[email protected]>
  • Loading branch information
Yu-Jack committed Jul 5, 2024
1 parent 0e9f82f commit a0a18ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/usbdevice/usbdevice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ func (h *DevHandler) WatchUSBDevices(ctx context.Context) error {
}
defer watcher.Close()

if err := filepath.Walk("/dev/bus/usb", func(path string, info fs.FileInfo, err error) error {
if err := filepath.WalkDir("/dev/bus/usb", func(path string, info fs.DirEntry, err error) error {
fmt.Println("===========")
fmt.Println(path)
fmt.Println(info.Name())
fmt.Println("===========")
if err := watcher.Add(path); err != nil {
return fmt.Errorf("failed to watch device %s parent directory: %s", path, err)
Expand Down

0 comments on commit a0a18ae

Please sign in to comment.