Skip to content

Conversation

@chopin1998
Copy link

This PR adds auto refresh of the USB device tree when devices are plugged/unplugged , using libudev

  • Tested on debian(sid, 6.14.8)
  • Added libudev dependency in configure.ac/ makefile.am

plz review and let me know if any changes needed.

@chopin1998
Copy link
Author

sorry..... i'll fix them soon, and another question which do you like more: udev or inotify ?

@gregkh
Copy link
Owner

gregkh commented Jun 19, 2025

fanotify/inotify is probably better as that removes the dependency requirement.

@chopin1998
Copy link
Author

ok, i'll following style and change to inotify later

@chopin1998 chopin1998 requested a review from gregkh June 21, 2025 14:35
@chopin1998
Copy link
Author

pushed, let me know if there are any issues..

@gregkh
Copy link
Owner

gregkh commented Jun 24, 2025

This should all be just one commit, don't break things in order to fix them up in a follow-on patch please, that's just unneeded work on your side and makes it harder to look at the end result on the reviewer's side.

Copy link
Owner

@gregkh gregkh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, but I don't understand this commit at all, what is it for and why is it needed?

And why is there a .vscode/ file at all?

Please redo these so that there's just one commit, with a good description, and a signed-off-by line (sorry I forgot to check for that before.)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed.

Makefile.am Outdated

AM_CPPFLAGS = $(GTK_CFLAGS)
usbview_LDADD = $(GTK_LIBS)
AM_CPPFLAGS = $(GTK_CFLAGS) $(LIBUDEV_CFLAGS)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document somewhere in the commit message that you are adding the requirement of libudev please.

main.c Outdated

action = udev_device_get_action(dev);
if (action)
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proper kernel coding style please.

main.c Outdated
{
GtkWidget *window1;

gtk_init(&argc, &argv);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You turned tabs into spaces :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants