Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: Iae81201889d1bb4ca324243b863948cb60420ae7
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
diff --git a/examples/inventory.json b/examples/inventory.json
index fe9ae57..646cdbe 100644
--- a/examples/inventory.json
+++ b/examples/inventory.json
@@ -18,7 +18,7 @@
}
},
"frus": {
- "/sys/devices/path/to/motherboard/eeeprom": {
+ "/sys/devices/path/to/motherboard/eeprom": {
"inventoryPath": "/bus/path/for/motherboardfru",
"extraInterfaces": {
"xyz.openbmc_project.Inventory.Item.Board.Motherboard": null
diff --git a/ibm_vpd_app.cpp b/ibm_vpd_app.cpp
index 6c3e31b..6a2a231 100644
--- a/ibm_vpd_app.cpp
+++ b/ibm_vpd_app.cpp
@@ -546,8 +546,8 @@
}
else
{
- // missing required informations
- std::cerr << "VPD inventory JSON missing basic informations of "
+ // missing required information
+ std::cerr << "VPD inventory JSON missing basic information of "
"preAction "
"for this FRU : ["
<< file << "]. Executing executePostFailAction."
@@ -561,7 +561,7 @@
else
{
// If the FRU is not there, clear the VINI/CCIN data.
- // Enity manager probes for this keyword to look for this
+ // Entity manager probes for this keyword to look for this
// FRU, now if the data is persistent on BMC and FRU is
// removed this can lead to ambiguity. Hence clearing this
// Keyword if FRU is absent.
@@ -624,8 +624,8 @@
* present, it will be added to the map with a suitable default value (true for
* Functional and Enabled)
*
- * @param[in] object - The inventory D-Bus obejct without the inventory prefix.
- * @param[inout] interfaces - Reference to a map of inventory interfaces to
+ * @param[in] object - The inventory D-Bus object without the inventory prefix.
+ * @param[in,out] interfaces - Reference to a map of inventory interfaces to
* which the properties will be attached.
*/
static void setOneTimeProperties(const std::string& object,
@@ -1151,7 +1151,7 @@
// If the backup is on the cache we need to copy the
// backup data to the VPD map to ensure there is no
- // mimatch b/n them. So if backup data is not default,
+ // mismatch b/n them. So if backup data is not default,
// then irrespective of primary data(default or other
// than backup), copy the backup data to vpd map as we
// don't need to change the backup data in either case
@@ -1286,7 +1286,7 @@
boost::split(i2cReg, matchFound.str(0),
boost::is_any_of("-"));
- // remove 0s from begining
+ // remove 0s from beginning
const regex pattern("^0+(?!$)");
for (auto& i : i2cReg)
{
@@ -1607,7 +1607,7 @@
// Eg: nvme drive in nvme slot is not an embedded FRU. So don't set
// Present to true for such sub frus.
// Eg: ethernet port is embedded into bmc card. So set Present to true
- // for such sub frus. Also donot populate present property for embedded
+ // for such sub frus. Also do not populate present property for embedded
// subfru which is synthesized. Currently there is no subfru which are
// both embedded and synthesized. But still the case is handled here.
if ((item.value("embedded", true)) &&
@@ -1755,7 +1755,7 @@
if ((js["frus"].find(file) != js["frus"].end()) &&
(file == systemVpdFilePath))
{
- std::cout << "We have already collected system VPD, skiping."
+ std::cout << "We have already collected system VPD, skipping."
<< std::endl;
return 0;
}
diff --git a/ibm_vpd_utils.cpp b/ibm_vpd_utils.cpp
index 9247870..de38c6e 100644
--- a/ibm_vpd_utils.cpp
+++ b/ibm_vpd_utils.cpp
@@ -874,9 +874,9 @@
}
else
{
- // missing required informations
+ // missing required information
std::cerr
- << "VPD inventory JSON missing basic informations of presence "
+ << "VPD inventory JSON missing basic information of presence "
"for this FRU : ["
<< file << "]. Executing executePostFailAction." << std::endl;
@@ -950,9 +950,9 @@
}
else
{
- // missing required informations
+ // missing required information
std::cerr
- << "VPD inventory JSON missing basic informations of preAction "
+ << "VPD inventory JSON missing basic information of preAction "
"for this FRU : ["
<< file << "]. Executing executePostFailAction." << std::endl;
@@ -1075,7 +1075,7 @@
"xyz.openbmc_project.Inventory.Item.Dimm") !=
item["extraInterfaces"].end())
{
- // check added here for DDIMM only workarround
+ // check added here for DDIMM only workaround
vpdType dimmType = vpdTypeCheck(vpdVector);
if (dimmType == constants::DDR4_DDIMM_MEMORY_VPD ||
dimmType == constants::DDR5_DDIMM_MEMORY_VPD)
diff --git a/ibm_vpd_utils.hpp b/ibm_vpd_utils.hpp
index 6395e5b..03015d1 100644
--- a/ibm_vpd_utils.hpp
+++ b/ibm_vpd_utils.hpp
@@ -114,7 +114,7 @@
std::string encodeKeyword(const std::string& kw, const std::string& encoding);
/** @brief Reads a property from the inventory manager given object path,
- * intreface and property.
+ * interface and property.
* @param[in] obj - object path
* @param[in] inf - interface
* @param[in] prop - property whose value is fetched
@@ -452,7 +452,7 @@
*
* This method checks in the given inventory::InterfaceMap if the given
* interface key is existing or not. If the interface key already exists, given
- * property map is inserted into it. If the key does'nt exist then given
+ * property map is inserted into it. If the key doesn't exist then given
* interface and property map pair is newly created. If the property present in
* propertymap already exist in the InterfaceMap, then the new property value is
* ignored.
diff --git a/meson.options b/meson.options
index 27c8a26..64118fa 100644
--- a/meson.options
+++ b/meson.options
@@ -9,7 +9,7 @@
option('INVENTORY_MANAGER_SERVICE',type: 'string', value: 'xyz.openbmc_project.Inventory.Manager', description: 'Inventory manager service')
option('IPZ_INTERFACE', type: 'string', value: 'com.ibm.ipzvpd', description: 'IPZ VPD interface')
option('BUSNAME', type : 'string', value : 'com.ibm.VPD.Manager',description : 'BUS NAME FOR THE SERVICE')
-option('OBJPATH', type : 'string', value : '/com/ibm/VPD/Manager', description : 'OBJECT PATH FOT THE SERVICE')
+option('OBJPATH', type : 'string', value : '/com/ibm/VPD/Manager', description : 'OBJECT PATH FOR THE SERVICE')
option('IFACE', type : 'string', value : 'com.ibm.VPD.Manager', description : 'INTERFACE NAME')
option('vpd-manager', type: 'feature', description: 'ENABLE VPD-MANAGERR APPLICATION')
option('POWER_SUPPLY_TYPE_INTERFACE', type : 'string', value : 'xyz.openbmc_project.Inventory.Item.PowerSupply', description : 'Power Supply Type Interface')
diff --git a/test/vpd-manager-test/reader_test.cpp b/test/vpd-manager-test/reader_test.cpp
index 7c1dccf..54c98f0 100644
--- a/test/vpd-manager-test/reader_test.cpp
+++ b/test/vpd-manager-test/reader_test.cpp
@@ -126,7 +126,7 @@
TEST_F(vpdManagerReaderTest, getFrusAtLocation_Invalid)
{
- // invalid lication code
+ // invalid location code
std::string unexpandedLocationCode = "Uabc-X0";
MockUtilCalls uCalls;
diff --git a/vpd-manager/editor_impl.cpp b/vpd-manager/editor_impl.cpp
index 898a925..727afac 100644
--- a/vpd-manager/editor_impl.cpp
+++ b/vpd-manager/editor_impl.cpp
@@ -527,7 +527,7 @@
// update the DBUS interface COM as well as XYZ path
prop.emplace("LocationCode", expandedLocationCode);
- // TODO depricate this com.ibm interface later
+ // TODO deprecate this com.ibm interface later
interfaces.emplace(IBM_LOCATION_CODE_INF, prop);
interfaces.emplace(XYZ_LOCATION_CODE_INF, std::move(prop));
}
diff --git a/vpd-manager/editor_impl.hpp b/vpd-manager/editor_impl.hpp
index 3253332..98a2fa1 100644
--- a/vpd-manager/editor_impl.hpp
+++ b/vpd-manager/editor_impl.hpp
@@ -76,7 +76,7 @@
* looks for the keyword name in that record. when found it updates the data
* of keyword with the given data. It does not block keyword data update in
* case the length of new data is greater than or less than the current data
- * length. If the new data length is more than the length alotted to that
+ * length. If the new data length is more than the length allotted to that
* keyword the new data will be truncated to update only the allotted
* length. Similarly if the new data length is less then only that much data
* will be updated for the keyword and remaining bits will be left
diff --git a/vpd-manager/gpioMonitor.hpp b/vpd-manager/gpioMonitor.hpp
index 078902a..790373b 100644
--- a/vpd-manager/gpioMonitor.hpp
+++ b/vpd-manager/gpioMonitor.hpp
@@ -40,7 +40,7 @@
}
private:
- /** @brief GPIO informations to get parsed from vpd json*/
+ /** @brief GPIO information to get parsed from vpd json*/
// gpio pin indicates presence/absence of fru
const std::string presencePin;
@@ -88,7 +88,7 @@
}
/** @brief This function runs a timer , which keeps checking for if an event
- * happened, if event occured then takes action.
+ * happened, if event occurred then takes action.
*
* @param[in] ioContext - Pointer to io context object.
*/
@@ -107,7 +107,7 @@
/** @class GpioMonitor
* @brief Responsible for initialising the private variables containing gpio
- * infos. These informations will be fetched from vpd json.
+ * infos. These information will be fetched from vpd json.
*/
class GpioMonitor
{
@@ -127,12 +127,12 @@
}
private:
- // Json file to get the datas
+ // Json file to get the data
nlohmann::json& jsonFile;
// Array of event handlers for all the attachable FRUs
std::vector<std::shared_ptr<GpioEventHandler>> gpioObjects;
- /** @brief This function will extract the gpio informations from vpd json
+ /** @brief This function will extract the gpio information from vpd json
* and store it in GpioEventHandler's private variables
*
* @param[in] ioContext - Pointer to io context object.
diff --git a/vpd-manager/manager.cpp b/vpd-manager/manager.cpp
index 767ea0b..7b5ae96 100644
--- a/vpd-manager/manager.cpp
+++ b/vpd-manager/manager.cpp
@@ -273,7 +273,7 @@
// detect if essential frus are present in the system.
checkEssentialFrus();
- // check and perfrom recollection for FRUs replaceable at
+ // check and perform recollection for FRUs replaceable at
// standby.
performVPDRecollection();
return;
@@ -599,12 +599,12 @@
// required.
if (prePostActionRequired)
{
- // The sleep of 1sec is sliced up in 10 retries of 10 miliseconds
+ // The sleep of 1sec is sliced up in 10 retries of 10 milliseconds
// each.
for (auto retryCounter = VALUE_0; retryCounter <= VALUE_10;
retryCounter++)
{
- // sleep for 10 milisecond
+ // sleep for 10 millisecond
if (usleep(VALUE_100000) != VALUE_0)
{
std::cout << "Sleep failed before accessing the file"
diff --git a/vpd-parser/keyword_vpd_parser.cpp b/vpd-parser/keyword_vpd_parser.cpp
index ca05692..b335c07 100644
--- a/vpd-parser/keyword_vpd_parser.cpp
+++ b/vpd-parser/keyword_vpd_parser.cpp
@@ -28,7 +28,7 @@
auto kwValMap = kwValParser();
- // Donot process these two functions for bono type VPD
+ // Do not process these two functions for bono type VPD
if (!kwVpdType)
{
validateSmallResourceTypeEnd();
@@ -55,7 +55,7 @@
{
kwVpdIterator = keywordVpdVector.begin();
- // Check for large resource type identfier string
+ // Check for large resource type identifier string
if (*kwVpdIterator != KW_VPD_START_TAG)
{
throw std::runtime_error(
diff --git a/vpd-parser/keyword_vpd_parser.hpp b/vpd-parser/keyword_vpd_parser.hpp
index 4466c6b..6b02961 100644
--- a/vpd-parser/keyword_vpd_parser.hpp
+++ b/vpd-parser/keyword_vpd_parser.hpp
@@ -130,7 +130,7 @@
/**
* @brief Check for iterator Out of Bound exception
*
- * Check if no.of elements from (begining of the vector) to (iterator +
+ * Check if no.of elements from (beginning of the vector) to (iterator +
* incVar) is lesser than or equal to the total no.of elements in the
* vector. This check is performed before the advancement of the iterator.
*
diff --git a/vpd-parser/parser_factory.hpp b/vpd-parser/parser_factory.hpp
index ca9f41e..f6f54c3 100644
--- a/vpd-parser/parser_factory.hpp
+++ b/vpd-parser/parser_factory.hpp
@@ -11,7 +11,7 @@
namespace factory
{
/** @class ParserFactory
- * @brief Factory calss to instantiate concrete parser class.
+ * @brief Factory class to instantiate concrete parser class.
*
* This class should be used to instantiate an instance of parser class based
* on the typeof vpd file.
diff --git a/vpd-parser/parser_interface.hpp b/vpd-parser/parser_interface.hpp
index 4ad583f..259ef86 100644
--- a/vpd-parser/parser_interface.hpp
+++ b/vpd-parser/parser_interface.hpp
@@ -19,7 +19,7 @@
* @brief Interface class for vpd parsers.
*
* Any concrete parser class, implementing the parser logic needs to
- * derive from this interface class and ovverride the methods declared
+ * derive from this interface class and override the methods declared
* in this class.
*/
class ParserInterface
@@ -28,7 +28,7 @@
/**
* @brief An api to implement parsing logic for VPD file.
* Needs to be implemented by all the class deriving from
- * parser inerface.
+ * parser interface.
*
* @return parsed format for vpd data, depending upon the
* parsing logic.
@@ -39,7 +39,7 @@
* @brief An api to return interface name which will hold the
* data on cache.
* Needs to be implemented by all the class deriving fronm
- * parser inerface
+ * parser interface
*
* @return - Interface name for that vpd type.
*/
diff --git a/vpd_exceptions.hpp b/vpd_exceptions.hpp
index bcfd366..c0f84e8 100644
--- a/vpd_exceptions.hpp
+++ b/vpd_exceptions.hpp
@@ -10,7 +10,7 @@
{
/** @class VPDException
- * @brief This class inherits std::runtime_error and overrrides
+ * @brief This class inherits std::runtime_error and overrides
* "what" method to return the description of exception.
* This class also works as base class for custom exception
* classes of openpower-vpd repository.
diff --git a/vpd_tool_impl.hpp b/vpd_tool_impl.hpp
index 25f07af..18070f8 100644
--- a/vpd_tool_impl.hpp
+++ b/vpd_tool_impl.hpp
@@ -78,7 +78,7 @@
/**
* @brief Interface Decider
* Decides whether to make the dbus call for
- * getting properites from extraInterface or from
+ * getting properties from extraInterface or from
* VINI interface, depending on the value of
* extraInterfaces object in the inventory json.
*
@@ -282,7 +282,7 @@
/**
* @brief Fix system VPD and its backup VPD
- * API is triggerred if the backup of system VPD has to be taken in a
+ * API is triggered if the backup of system VPD has to be taken in a
* hardware VPD. User can use the --fixSystemVPD option to restore the
* keywords in backup VPD and/or system VPD.
*
diff --git a/vpdecc/vpdecc.h b/vpdecc/vpdecc.h
index 2286abe..705d107 100644
--- a/vpdecc/vpdecc.h
+++ b/vpdecc/vpdecc.h
@@ -27,7 +27,7 @@
/* this function creates the ECC */
/* */
/* @param pData In-Buffer containing the raw VPD data */
-/* (wont't be changed) */
+/* (won't be changed) */
/* */
/* @param vDataLength In should contain the length of the
* Data */
diff --git a/vpdecc/vpdecc_support.c b/vpdecc/vpdecc_support.c
index c6bc1c3..4d86105 100644
--- a/vpdecc/vpdecc_support.c
+++ b/vpdecc/vpdecc_support.c
@@ -43,7 +43,7 @@
/* */
/******************************************************************************/
void seepromGenCsDecode(const unsigned char numBits,
- const unsigned char syndrom,
+ const unsigned char syndrome,
const unsigned char* csdSyndroms,
unsigned char* vResult)
{}
@@ -61,7 +61,7 @@
/******************************************************************************/
/* seepromEccCheck */
/* */
-/* Checks the data integrety and correct it if possible */
+/* Checks the data integrity and correct it if possible */
/* */
/******************************************************************************/
diff --git a/vpdecc/vpdecc_support.h b/vpdecc/vpdecc_support.h
index 6f71c03..6dc8ce8 100644
--- a/vpdecc/vpdecc_support.h
+++ b/vpdecc/vpdecc_support.h
@@ -20,7 +20,7 @@
/******************************************************************************/
/******************************************************************************/
void seepromGenCsDecode(const unsigned char numBits,
- const unsigned char syndrom,
+ const unsigned char syndrome,
const unsigned char* csdSyndroms,
unsigned char* vResult);