meta-gbmc-staging: entity-manager: gracefully handle read-only filesystem

When the filesystem is mounted as read-only (due to eMMC/flash errors),
any filesystem modification operations (remove, create_directory, copy)
in std::filesystem throw exceptions, which crash the entity-manager daemon.

This patch updates these calls to use the std::error_code overloads,
preventing uncaught filesystem exceptions and allowing the daemon to
continue running (or fail gracefully) rather than entering a crash loop.

no fusion2 link
Google-Bug-Id: 516166428
Tested: Compiled locally
Change-Id: I36efe6a780ed1bb05cb8d2135f4d5b8b246ea69b
Signed-off-by: Tom Tung <tomtung@google.com>
2 files changed
tree: c7650b5ea02f7efc61c06d4b7e91f6a8abd151e2
  1. classes/
  2. conf/
  3. dynamic-layers/
  4. recipes-bsp/
  5. recipes-connectivity/
  6. recipes-core/
  7. recipes-devtools/
  8. recipes-extended/
  9. recipes-google/
  10. recipes-kernel/
  11. recipes-phosphor/
  12. recipes-support/
  13. recipes-tpm1/
  14. recipes-tpm2/
  15. LICENSE
  16. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.