6 Commits

Author SHA1 Message Date
togrue
d43050abd7 Change the FF_MakeNameCompliant behavior (#63)
* 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>
2024-02-27 12:03:09 -08:00
Soren Ptak
90281cb5ba CI-CD-Updates (#58)
* Remove exec privileges from c and h files
* Apply Formatting Changes
* Spelling Mistake Fixes
2023-12-05 17:34:02 -08:00
phelter
08d0cff40d Feature/fixing clang gnu compiler warnings (#45)
* 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>
2023-05-16 12:16:58 -07:00
Hein Tibosch
50ea2f2568 Formatted sources using Uncrustify, updated copyright notices. (#16)
* Formatted sources using Uncrustify, updated copyright notices.

* Adding the uncrustify configuration file.

* Changed the copyright notices.

Co-authored-by: Hein Tibosch <hein@htibosch.net>
2021-05-10 11:12:02 -07:00
Yuhui Zheng
f90428e298 Sync with the distribution in FreeRTOS-Labs at commit 1ad51506443ab5550fbdde9c27a84b5879dd2a73. 2020-02-27 17:29:06 -08:00
Yuhui Zheng
7daf0485d8 Initial commit: FreeRTOS-Plus-FAT-160919a-MIT as-is. 2019-11-19 17:57:06 -08:00