commit | e6e34f4859ad2b94a335d5d513dbe8ed18ba910e | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Wed Dec 01 10:30:15 2021 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Dec 01 19:57:19 2021 +0000 |
tree | 19c9b57b8507276ee849a2f34dcae90fea0fe3dc | |
parent | 15e2b1eee1083f0948e9253255535d5c8fe37eb5 [diff] |
pw_stream: Detect EOF in StdFileReader Peek at the next byte to set EOF if at the very end of the file. This allows a zero-byte read to return OUT_OF_RANGE if there is no more data in the file. Change-Id: I5fd0c6d18dd3f7562e9e42b3ee6485f35523e17d Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/71561 Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Reviewed-by: Alexei Frolov <frolv@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/