-
Notifications
You must be signed in to change notification settings - Fork 65
add auto refresh when usb device plug/unplug #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
sorry..... i'll fix them soon, and another question which do you like more: udev or inotify ? |
|
fanotify/inotify is probably better as that removes the dependency requirement. |
|
ok, i'll following style and change to inotify later |
|
pushed, let me know if there are any issues.. |
|
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. |
…y, using netlink instead...
There was a problem hiding this 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.)
.vscode/settings.json
Outdated
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) | ||
| { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 :(
This PR adds auto refresh of the USB device tree when devices are plugged/unplugged , using libudev
plz review and let me know if any changes needed.