-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix for libusb_kernel_driver_active & error handling for st.st_size #1210
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nightwalker-87
approved these changes
Jan 5, 2022
There are 2 calls _stlink_usb_exit_dfu_mode In usb.c (at lines 1284 and 1293) and no single call _stlink_usb_exit_debug_mode. Apparently typo on line 1293
There is one more change, typo on line 1293 (see second commit) |
There is no enironment variable "STLINK_DEVICE" in user system, and program do not set it. So I removed all code which works with it.
Nightwalker-87
approved these changes
Jan 9, 2022
Ant-ON
reviewed
Jan 9, 2022
Ant-ON
approved these changes
Jan 9, 2022
Ant-ON
reviewed
Jan 9, 2022
Looking at this more closely, I think we can merge it to |
Nightwalker-87
changed the title
Update usb.c
Fix for libusb_kernel_driver_active & error handling for st.st_size
Jan 9, 2022
Closed
5 tasks
hydroconstructor
force-pushed
the
develop
branch
from
January 9, 2022 14:53
5e9650e
to
4132973
Compare
Error in file size comparizon. Due to type casting, instead of compare file size with max. singed int value, it compares with -1. Then function returns with error message.
Nightwalker-87
approved these changes
Jan 9, 2022
In stlink-org#1210 from codebase was removed functionality to specify ST-LINK by environment variable. This still mentioned in documentation, so I updated it.
Nightwalker-87
approved these changes
Jan 10, 2022
gszy
reviewed
Jan 15, 2022
@hydroconstructor Please address the remaining points. |
Comment was: removing the MAX_FILE_SIZE ifdef/define/endif, replacing the st.st_size > (off_t)SSIZE_MAX test with st.st_size > (intmax_t) SIZE_MAX, perhaps removing the sizeof(st.st_size) != sizeof(size_t) test as well. done here
Co-authored-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Nightwalker-87
approved these changes
Jan 23, 2022
Thanks @hydroconstructor 👍 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to libusb API documentation, function libusb_kernel_driver_active is not available on Windows. So I think it will be useful not to compile it on Windows platform.
(Closes #1211) (Closes #1214)