commit | 45d54976fdb8d27a539d78dc1cd7e2db0998b43a | [log] [tgz] |
---|---|---|
author | jinuthomas <jinu.joy.thomas@in.ibm.com> | Mon Jul 03 04:36:29 2023 -0500 |
committer | jinuthomas <jinu.joy.thomas@in.ibm.com> | Sun Jul 30 23:24:35 2023 -0500 |
tree | 08400e10beeae4b14f5117aea6ea9c6f7719e5d0 | |
parent | d8577739a7875a601a32cd461e8151cb3b5b308d [diff] |
Catching File Exceptions in openpower-vpd-parser In this commit, I have added code to handle file exceptions more effectively. By implementing proper exception handling, we can improve the robustness and reliability of the file operations within our codebase. Here are the key changes made in this commit: - Introduced a try-catch block around the file operation sections. - Within the try block, added code to perform the necessary file operations. - Implemented catch blocks to handle specific file exceptions. - In each catch block, included appropriate error handling logic, such as logging the error message or displaying a user-friendly error message. - Ensured that the catch blocks gracefully handle the exceptions and prevent the program from crashing or behaving unexpectedly. By adding this exception handling code, we can anticipate and handle potential file-related errors gracefully, providing a smoother experience for users and preventing any unexpected crashes or data loss. This would also aid in debugging issues. Change-Id: I621a7f0ba68d2c298e4fea0a9d3e21d1939cd090 Signed-off-by: jinuthomas <jinu.joy.thomas@in.ibm.com>
This repository hosts code for OpenPower and IBM IPZ format VPD parsers. Both OpenPower VPD and IPZ VPD formats are structured binaries that consist of records and keywords. A record is a collection of multiple keywords. More information about the format can be found here.
The repository consists of two distinct applications, which are:
This is a build-time YAML driven application that parses the OpenPower VPD format and uses the YAML configuration (see extra-properties-example.yaml and writefru.yaml) to determine:
The application instance must be passed in the file path to the VPD (this can, for example, be a sysfs path exposed by the EEPROM device driver) and also the D-Bus object path(s) that EEPROM data needs to be published under.
This parser is can be built by passing in the --enable-ibm-parser
configure option. This parser differs from the OpenPower VPD parser in the following ways:
#
and are > 255 bytes in length).Making the application runtime JSON driven allows us to support multiple systems (with different FRU configurations) to be supported in a single code image as well as making the application more flexible for future improvements.