-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improves parsing of Unix format file names, updates comments #523
base: master
Are you sure you want to change the base?
Conversation
* Adds a (static inline) helper, parse_file_version() to version parsing code. - Removes handling of "filename%" as version 0 (version 0 is not valid) - Adds handling of Alto/IFS version "filename!nnn" - Improves robustness of version parsing (no integer overflow errors) * Replaces private FNAMETOOLONG error code with ENAMETOOLONG standard error. * Replaces tests for "magic numbers" with standard ERRNO values (ENOENT, EXDEV) in error case for rename() operations. * Reduces storage requirement for versions from 16 bytes to 10 bytes to match the maximum acceptable version number, "999999999". * Updates various code comments to be correct and clearer.
I think this is ready to merge -- I'd appreciate testing on non-macOS systems. |
Initial testing on amd64 Linux Mint 22 Cinnamon reveals no issues so far. |
Edge cases are an excellent candidate for testing. MAXVERSION is 999999999, so, for example:
(currently it'll take a SIGSEGV and fall into URaid - I have a fix underway.) |
Errors reported back from the DSK and UFS code return an "errno" value, which is processed by |
…ine procedures. These are used in many places so code bloat can be reduced by using procedures.
Here are the results of your tests on amd64 Linux Mint 22 Cinnamon.
The other tests report the file is not found. The head of my local copy of the report from
|
Adds a (static inline) helper, parse_file_version() to version parsing code.
Replaces private FNAMETOOLONG error code with ENAMETOOLONG standard error.
Replaces tests for "magic numbers" with standard ERRNO values (ENOENT, EXDEV) in error case for rename() operations.
Reduces storage requirement for versions from 16 bytes to 10 bytes to match the maximum acceptable version number, "999999999".
Updates various code comments to be correct and clearer.