-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Bugfix: MODE SELECT for format page is incorrect (issue #818) #899
Conversation
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.
Approved @uweseimet . I'll let you do the merging. Thanks!
This might not have been caused by the changes in this PR, but I'm getting this compiler error with gcc 10.2.1 / Bullseye / ARM (Pi Zero W).
|
@akuker Looks as if your suggested change (which I liked better than the previous code) is causing this issue. I will change the code back to using strcpy as part of this PR. I hope that's fine for you. |
@rdmark I fixed the compilation issue (which was depending on the compiler used) and double-checked that it compiles again on bullseye. |
SonarCloud Quality Gate failed. |
@akuker @rdmark I think I know now how to make the compiler happy while still using strncpy:
Actually the compiler is right: If you copy exactly IFNAMSIZ bytes the terminating null byte for the string will be missing. |
Successfully tested with software that can change the sector size before formatting. Unit tests were added for the updated code.
After fixing the descriptor and offset handling rascsi behaves like a Fujitsu M2624S drive and a MODE SELECT/FORMAT sequence works as far as rascsi can support it.