* Change the handling of invalid file-names to cause an error. Depending
on the entry to create (directory/file), a different error code is
returned.
Description
-----------
This changes the behavior of the FF_CreateDirent function to return an
error in case of an invalid path.
Filenames with the first character of 0xE5 are still modified. (Which
might have some issues. TODO)
Note: Invalid directory paths and invalid file paths now result in two
different FreeRTOS+ return values. Is this the intended behavior or
should only one error code be used?
```
case FF_ERR_FILE_INVALID_PATH:
return pdFREERTOS_ERRNO_ENOTDIR; /* The path of the file was not found. */
case FF_ERR_DIR_INVALID_PATH:
return pdFREERTOS_ERRNO_EINVAL; /* Could not find the directory specified by the path. */
```
FF_MakeNameCompliant returns a boolean and not an error-code, because
the function
would need an additional parameter to select the right error code
(FF_ERR_DIR_INVALID_PATH or FF_ERR_FILE_INVALID_PATH).
Test Steps
-----------
A invalid filepath "test:file.txt" resulted in setting the
FF_ERR_FILE_INVALID_PATH. (Tested through breakpoint in
prvFFErrorToErrno).
Todo:
- mkdir with invalid path
- handling of names starting with 0xE5
Checklist:
----------
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [ ] I have tested my changes. No regression in existing tests.
- [ ] I have modified and/or added unit-tests to cover the code changes
in this Pull Request.
Related Issue
-----------
<!-- If any, please provide issue ID. -->
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
---------
Co-authored-by: Tobias Gruen <tobias.gruen@ifta.com>
* Support for CMake builds. Added Linux stub port for now to allow cross
compilation.
* Fixing misuse of doxygen documentation
* Converting prints from %lu to %u where possible as per request in comments related to (#35)
* Fixing clang compiler warnings.
* Fixing build test to work regardless of configuration.
* Adding in for Zynq port dependency on uncached_memory target.
* Excluding build_test from all build - must request it explicitly.
* Ensuring XPAR_XSDPS_0_IS_CACHE_COHERENT is 1 for this build since using
a modified xsdps driver that requires it.
* Updating compiler warnings.
* Fixing documentation, signed/unsigned conversion. Bugfix for time based code for removing failure in 2032 due to uint32_t used for time.
* Fixing error creation using FF_createERR everywhere missed.
* Fixing build_test in ci.yml
* Uncrustify: triggered by comment.
---------
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>