Manage configuration parser file state using RAII

Static code analysis tools flagged the file state handling as a
potential source of resource loss. Change the code to use RAII to
control the file state automatically. This eliminates the need for
manual intervention, and errors that may arise from manual filehandle
management.

Tested:
Placed debug print statements to confirm the stream is still opened,
and the contents parsed. Removed the print statements following
confirmation.

Change-Id: I6f20117b948673a4babc4b702da741145e57a1c6
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
1 file changed
tree: 21a6183703861981ed530e25bf9633da316a5c7c
  1. docs/
  2. gen/
  3. src/
  4. subprojects/
  5. test/
  6. yaml/
  7. .clang-format
  8. .gitignore
  9. .shellcheck
  10. LICENSE
  11. MAINTAINERS
  12. meson.build
  13. meson_options.txt
  14. README.md
  15. xyz.openbmc_project.Network.conf.in
  16. xyz.openbmc_project.Network.service.in
README.md

To Build

To build this package, do the following steps:

    1. meson build
    2. ninja -C build