xusb: Define proper exit status
Can we consider to propagate the return value from test_device() to main()? In this way, we can easily check the return code directly like echo $? in Linux to know whether the test is failed.
I'd also change the test_device to return 0/1 (instead of -1), or even EXIT_SUCCESS/EXIT_FAILURE named constants.
Negative exit code usually means exit by interruption.
Yes, a proper exit status would be a good improvement. In general I'd suggest letting internal functions return and propagate libusb error codes, but then in main(), also on line 1216, something like if (r<0) return EXIT_FAILURE.
That sounds even better
I make a change according to the comment, but please let me know if this is what you want. Thanks!
Thanks for your contribution!