Skip to content
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

Fightwarn libusb 1.0+0.1 rebased part1 #1244

Commits on Dec 24, 2021

  1. Configuration menu
    Copy the full SHA
    8bd0050 View commit details
    Browse the repository at this point in the history
  2. configure.ac: regroup some NUT_ARG_WITH() closer to their NUT_CHECK_*…

    …() so help for detailed options is near
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    6a0210e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    68e2952 View commit details
    Browse the repository at this point in the history
  4. m4/nut_check_libusb.m4 + configure.ac: port newer solution for libusb…

    … version selection from libusb-1.0 branch
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    36ddfc9 View commit details
    Browse the repository at this point in the history
  5. configure.ac et al: drop the extra --with-libusb-version and handle i…

    …ts goals via --with-usb=VERSION
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    caed361 View commit details
    Browse the repository at this point in the history
  6. m4/nut_check_libusb.m4: always AC_DEFINE the WITH_LIBUSB_1_0 and WITH…

    …_LIBUSB_0_1 macros with a 0 or 1 value
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    28500b7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    aca0b7d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    72c5586 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d69ce0c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1b16045 View commit details
    Browse the repository at this point in the history
  11. Convert C code from "#ifdef WITH_LIBUSB_x_y" to "#if" tests for defin…

    …ed value - merging missed a few in libusb-1.0+0.1 branch
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    e1f305b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e3daf23 View commit details
    Browse the repository at this point in the history
  13. drivers/nut_libusb.h: sanity check that exactly one version of WITH_L…

    …IBUSB_x_y is set (defined and has value 1)
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    cff486f View commit details
    Browse the repository at this point in the history
  14. drivers/bcmxcp_usb.c: sanity check that exactly one version of WITH_L…

    …IBUSB_x_y is set (defined and has value 1)
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    73bed50 View commit details
    Browse the repository at this point in the history
  15. drivers/usb-common.h: sanity check that exactly one version of WITH_L…

    …IBUSB_x_y is set (defined and has value 1)
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    64c026f View commit details
    Browse the repository at this point in the history
  16. tools/nut-usbinfo.pl: sanity check that exactly one version of WITH_L…

    …IBUSB_x_y is set (defined and has value 1)
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    01b827c View commit details
    Browse the repository at this point in the history
  17. drivers/bcmxcp_usb.c: range-check and cast args for usb_control_msg()…

    … => libusb_control_transfer() and usb_interrupt_read() => libusb_interrupt_transfer() for libusb-1.0 support
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    5d04357 View commit details
    Browse the repository at this point in the history
  18. drivers/nut_libusb.h already includes "usb-common.h" so no need to pu…

    …ll LibUSB headers again
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    8376307 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    75f5c99 View commit details
    Browse the repository at this point in the history
  20. drivers/usb-common.h: mark "static inline" functions with HAVE_PRAGMA…

    …_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC since not all C files call them
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    df22f5d View commit details
    Browse the repository at this point in the history
  21. drivers/usb-common.h: convert usb_get_string{_simple}() from macro al…

    …iases to real mappings with range-checks for libusb-1.0 API
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    2b70b19 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    2eaf526 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    8da949e View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    71b58da View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    62d27f2 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    691d397 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    0913c8d View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    64b9625 View commit details
    Browse the repository at this point in the history
  29. drivers/usbhid-ups.c: current use of SHUT_MODE relies on defined/not-…

    …defined, not on value for plain #if macro
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    58076f0 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    b4a1b1a View commit details
    Browse the repository at this point in the history
  31. USB: Rename typedef usb_ctrl_char to usb_ctrl_charbuf to avoid confsi…

    …on (it is a char* sibling, not plain char)
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    c2029ec View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    c498c8a View commit details
    Browse the repository at this point in the history
  33. drivers/usb-common.h + nut_libusb.h: typedef more usb_ctrl_* tokens t…

    …o match libusb-0.1 vs 1.0 API
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    aef977a View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    4e6bdb6 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    240ed66 View commit details
    Browse the repository at this point in the history
  36. drivers/libshut.c: shut_control_msg(): range-check data_size before s…

    …tuffing the number into a char
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    7575f9b View commit details
    Browse the repository at this point in the history
  37. drivers/libshut.c: shut_control_msg(): data_size is a "short int" (no…

    …t size_t) in this branch
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    5b17ec5 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    fdafe61 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    8c17853 View commit details
    Browse the repository at this point in the history
  40. drivers/usb-common.h: note the arg type for libusb_strerror() in comm…

    …ents to our macro wrapper nut_usb_strerror()
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    577a08b View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    ecbde45 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    ba3b133 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    47f4e51 View commit details
    Browse the repository at this point in the history
  44. drivers/usb-common.h: clarify that libusb timeouts are in millisecond…

    …s (with variouts int types per API version)
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    17d72c0 View commit details
    Browse the repository at this point in the history
  45. drivers/usb-common.h: define PRI_NUT_USB_CTRL_CHARBUFSIZE, usb_ctrl_m…

    …sgvalue and usb_ctrl_strindex
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    5c816d9 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    620c1fc View commit details
    Browse the repository at this point in the history
  47. drivers/usb-common.h: whitespace-separate definitions of ERROR_ACCESS…

    … etc., nut_usb_strerror() and similar macros
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    1bcd3b2 View commit details
    Browse the repository at this point in the history
  48. m4/nut_check_libusb.m4: make sure (missing) methods from another API …

    …are defined in config.h (so "#if HAVE_..." is valid and not guessed as 0)
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    516095c View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    8854934 View commit details
    Browse the repository at this point in the history
  50. drivers/nutdrv_atcl_usb.c: drop local libusb-0.1 vs 1.0 definitions n…

    …ow provided by usb-common.h
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    f968ed3 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    8ec7bd6 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    a904ede View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    45c470b View commit details
    Browse the repository at this point in the history
  54. drivers/riello_usb.c, richcomm_usb.c, nutdrv_atcl_usb.c: fix remainin…

    …g uses of (lib)usb_strerror with nut_usb_strerror()
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    9cbd3e0 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    80d30c4 View commit details
    Browse the repository at this point in the history
  56. configure.ac: update "clang-medium" warnings pre-set with -Wno-incomp…

    …atible-pointer-types-discards-qualifiers
    jimklimov committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    e71bc60 View commit details
    Browse the repository at this point in the history

Commits on Dec 25, 2021

  1. drivers/usb-common.h: map libusb_detach_kernel_driver_np (1.0) as usb…

    …_detach_kernel_driver_np (0.1)
    jimklimov committed Dec 25, 2021
    Configuration menu
    Copy the full SHA
    377c438 View commit details
    Browse the repository at this point in the history
  2. m4/nut_check_libusb.m4, drivers/libusb1.c + nutdrv_atcl_usb.c + richc…

    …omm_usb.c: honor that libusb-1.0 may HAVE_LIBUSB_DETACH_KERNEL_DRIVER_NP
    jimklimov committed Dec 25, 2021
    Configuration menu
    Copy the full SHA
    777406a View commit details
    Browse the repository at this point in the history
  3. m4/nut_check_libusb.m4, drivers/usb-common.h + nutdrv_atcl_usb.c + ri…

    …chcomm_usb.c: only apply usb_detach_kernel_driver_np to libusb-0.1 builds (no alias tricks)
    jimklimov committed Dec 25, 2021
    Configuration menu
    Copy the full SHA
    abb01ed View commit details
    Browse the repository at this point in the history