summaryrefslogtreecommitdiffstats
path: root/writefrudata.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Convert host-ipmid -> libipmidWilliam A. Kennington III2019-02-191-1/+1
| | | | | | | | | phosphor-host-ipmid now exposes a library along with headers for interfacing with the ipmi daemon. Compile and link against the new library. Change-Id: Ib222df1605afe277457f34eb69a3d65c663325b7 Signed-off-by: William A. Kennington III <wak@google.com>
* writefrudata: Fix verifyFruData to skip CRC check for internal use area.Oskar Senft2019-01-081-6/+16
| | | | | | | | | The contents of the internal use area are not defined beyond the first byte, which means that we should not expect its last byte to be a CRC for the area. Change-Id: I15aba7f48e13f8a93c5a6b7e3262d9227da5dad7 Signed-off-by: Oskar Senft <osk@google.com>
* writefrudata: add doxygen for methodsPatrick Venture2018-11-121-53/+93
| | | | | | | Add doxygen comments for methods. Change-Id: Ifc155279a21b258300dadd409abfb617652159dc Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: drop extra parens in call to parsePatrick Venture2018-10-311-2/+3
| | | | | | | | Drop extra parentheses around parameters in call to parse_fru_area. This involves changing a casting from c-style to a static_cast<>. Change-Id: I281a950146fd296f8c9b15bd6dfc8562ad9b14bc Signed-off-by: Patrick Venture <venture@google.com>
* IPMIFruArea: Drop unused dbus debugPatrick Venture2018-10-301-3/+0
| | | | | | | | Drop unused dbus debug code. There were no calls to set the values and the debug printing them would therefore always print empty strings. Change-Id: I767baf9f3450c9944396930069089a6bbb6e5c6a Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: add missing curly braces for stylePatrick Venture2018-10-301-0/+2
| | | | | | | OpenBMC style dictates conditional statements needs curly braces. Change-Id: Iff7066dec2e7a376f2a97e67591ba95b7aa8549d Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: drop unused sd-bus.hPatrick Venture2018-10-291-1/+0
| | | | | | | Drop unused sd-bus.h header. Change-Id: I0a55cd3aa5a551d7fa04706d7e0c5b6b275efcf5 Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: rename all variables per openbmc stylePatrick Venture2018-10-291-93/+91
| | | | | | | OpenBMC style declares variables be lower camel and not snake case. Change-Id: Iec348bf9825caecc976f654a37ac149a5981c94b Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: fixup function naming per stylePatrick Venture2018-10-291-15/+15
| | | | | | | Fixup function naming to lowerCamelCase for OpenBMC style guide. Change-Id: I8c8eda9f4aad29aadd092329248c97a556f22b9a Signed-off-by: Patrick Venture <venture@google.com>
* update: use sdbusplus instead of sd_bus raw pointersPatrick Venture2018-10-291-4/+3
| | | | | | | Update code to use sdbusplus instead of raw sd_bus pointers. Change-Id: I80cd4492480824827c27fbf19eb54487e28d3b75 Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: add missing constnessPatrick Venture2018-10-291-6/+6
| | | | | | | Set iterator to const reference where possible. Change-Id: I2d5d766990d49df3e6a6fef743698053413152fc Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: cleanup extra parenthesesPatrick Venture2018-10-291-9/+9
| | | | | | | | Cleanup extra parentheses from calling accessors against object pointer, which is actually a reference to a unique_ptr. Change-Id: Icf47bf376947d1afb0753c18be66417e2bac4507 Signed-off-by: Patrick Venture <venture@google.com>
* IPMIFruArea: apply naming convention to member functionsPatrick Venture2018-10-291-14/+14
| | | | | | | Apply naming convention to member functions. Change-Id: I3b0516592dd4225f7be43c3d9cdcc9c8853d20b7 Signed-off-by: Patrick Venture <venture@google.com>
* IPMIFruArea: move source into separate fru_area.cppPatrick Venture2018-10-291-74/+0
| | | | | | | Move the implementation of the class into its own source file. Change-Id: I02d941dd8173f0cede8cdfe8af1fdc5f5418abb4 Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: rename fru_area_vec_t type and use usingPatrick Venture2018-10-291-4/+6
| | | | | | | | Rename fru_area_vec_t to FruAreaVector and declare with using instead of typedef. Change-Id: I482c8ce7cedef1c67efb49b2e066ba9867547e93 Signed-off-by: Patrick Venture <venture@google.com>
* rename header: fru-area.hpp to fru_area.hppPatrick Venture2018-10-291-1/+1
| | | | | | | Rename fru-area.hpp header file per the openbmc file naming convention. Change-Id: I751c8d5650bb5e71238923c4728a9cdedccc7c7f Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata.cpp: drop unused, add used headerPatrick Venture2018-10-231-1/+1
| | | | | | | Drop the sdbusplus/server.hpp for sdbusplus/bus.hpp header. Change-Id: I8ea1ae95812ceb911ac6f70f259b5884e0c4ab3b Signed-off-by: Patrick Venture <venture@google.com>
* ipmi_fru: Rename to IPMIFruAreaPatrick Venture2018-10-201-8/+8
| | | | | | | | | | Rename ipmi_fru to IPMIFruArea FRU is an acronym for Field Replaceable Unit, but is consistently Fru in this codebase. Change-Id: I53f82b51bbf01416c8a666082612cd70945cc9a5 Signed-off-by: Patrick Venture <venture@google.com>
* ipmi_fru: drop unused sd_bus pointerPatrick Venture2018-10-201-3/+2
| | | | | | | Drop unused sd_bus pointer from fru_info class. Change-Id: Id93412c17d15118e8e6f66736c9dc74289392fa4 Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: drop unused lib mapper headerPatrick Venture2018-10-201-1/+0
| | | | | | | Drop unused lib mapper header. Change-Id: Ia7d2aad793d49d0c0cd5c5636e1e240147c25188 Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: drop unused dynamic linking headerPatrick Venture2018-10-201-1/+0
| | | | | | | Drop unused header: dlfcn.h Change-Id: I1ea305913572003fabf0c2b76e75f04640bb55cb Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata.cpp: add header for filePatrick Venture2018-10-201-0/+2
| | | | | | | Add header writefrudata.hpp to corresponding file. Change-Id: I2bec36d3c0744e7c496e7b7c161dfc6cf14bdf72 Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: add missing header: mapPatrick Venture2018-10-201-0/+1
| | | | | | | Add missing header map to add to standard namespace. Change-Id: I719fd0d194cb6fd8fa2e67f8acb784b498cf122a Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata.cpp: fixup variable shadowingPatrick Venture2018-10-201-2/+2
| | | | | | | | [writefrudata.cpp:176] -> [writefrudata.cpp:242]: (style) Local variable path shadows outer symbol Change-Id: I9fc35d6d67f51a0b9a2b9174c314e560d8531119 Signed-off-by: Patrick Venture <venture@google.com>
* style: rename update_inventory, move into anonymousPatrick Venture2018-10-201-135/+134
| | | | | | | | Move ipmi_update_inventory into an anonymous namespace and rename per the openbmc style naming conventions. Change-Id: I931bd9a50ca695d667eb5703089f1ca020ca6995 Signed-off-by: Patrick Venture <venture@google.com>
* style: move getService into anonymous namespacePatrick Venture2018-10-201-33/+33
| | | | | | | Move getService into an anonymous namespace. Change-Id: I75df449858bdc8347fafe3c0ab839ff18b5a2496 Signed-off-by: Patrick Venture <venture@google.com>
* style: move getFRUValue into anonymous namespacePatrick Venture2018-10-201-57/+57
| | | | | | | | | Move getFRUValue into anonymous namespace. A later step may move this into a global scope to enable testing, or it may be replaced by an interface. Change-Id: Ie4299ab713a455dd8c18b91c842ded5dfc26e85b Signed-off-by: Patrick Venture <venture@google.com>
* style: rename cleanup_error, move into anonymousPatrick Venture2018-10-201-24/+29
| | | | | | | | Move cleanup_error into an anonymous namespace and rename per the openbmc style naming conventions. Change-Id: Ib307ce2e89ecaff241c7b2d2403b75dbce794dbb Signed-off-by: Patrick Venture <venture@google.com>
* style: apply naming convention to ipmi_validate_fru_areaPatrick Venture2018-10-201-2/+2
| | | | | | | | Apply openbmc style naming convention to ipmi_validate_fru_area as part of a multi-step cleanup process. Change-Id: I082189030441e57579d072501279ff698fe1b7e3 Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: drop function parameter setPatrick Venture2018-10-181-1/+1
| | | | | | | | [writefrudata.cpp:570]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? Change-Id: Ie4162c28c10aa5964ebabb5f0db5f3f477ffa831 Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: swap in log<> calls, cleanup c callsPatrick Venture2018-10-181-55/+65
| | | | | | | | Transition debug and error output to use log<> mechanism. Transition c-library or compiler choice calls to cpp libraries. Change-Id: I1b5c6327897c30be1be2f34212138b8cacb0bc84 Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: catch exceptions in sdbusplus callPatrick Venture2018-10-171-10/+21
| | | | | | | Catch sdbusplus call exceptions. Change-Id: Iff0b2a4265061c90ebac78f90e4183f5e36037ef Signed-off-by: Patrick Venture <venture@google.com>
* add clang-formatPatrick Venture2018-10-171-129/+129
| | | | | | | Add clang-format file. Change-Id: Ib99bbeb0ec59b5befb742dec38286c24a7f842ea Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: reduce variable scopePatrick Venture2018-10-161-2/+1
| | | | | | | [writefrudata.cpp:441]: (style) The scope of the variable 'area_offset' can be reduced. Change-Id: Idc8f7639347e5f4ad06fd15beedbe13a6181b4f1 Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: delete unused variablePatrick Venture2018-10-161-1/+0
| | | | | | | [writefrudata.cpp:580]: (style) Unused variable: defined_fru_area Change-Id: Ic39b668db44e0111c078c214ed5d1ca11cb7b4bb Signed-off-by: Patrick Venture <venture@google.com>
* Spelling fixesGunnar Mills2018-06-141-2/+2
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: Ifbc540985ddef6ee0ac6e5510c9bf79f24f89f96 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Inventory:- Make changes in the mako and the C++ structureRatan Gupta2018-02-041-3/+3
| | | | | | | | | | This change lies in the Write Fru Data command processing. As fru yaml would be having extra properties like entityID,entityInstance,So changes were needed to make the change in the corresponding c++ structure. Change-Id: If23bb12563cdef34438746e2d6a8be7f54b7486d Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* fru_gen: reduce map in generated dataPatrick Williams2017-06-021-29/+5
| | | | | | | | | | | | | | | | Eliminate one level of the generated "frus" map by creating a structure for the lowest-level member. This should reduce the impact of a gcc bug that consumes excessive memory when compiling the generated map. Also removed the runtime calculation of the 'delimiter' character and instead generated it in the fru_gen python script. Resolves openbmc/openbmc#1441. Resolves openbmc/openbmc#1166. Change-Id: Iafe049d034354d58b68d357b4f49fd5e21b2c8c7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* writefrudata: removed un-needed sd_bus_refPatrick Williams2017-04-181-1/+1
| | | | | | | | sdbusplus's bus object has a change in semantics that no longer require a 'sd_bus_ref' call. See changes for openbmc/openbmc#1432. Change-Id: I853b9d88aa5711d29be3edce5d4ad67bfd27b3d1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Trimmed out code paths that relied on the old namespace.Patrick Venture2017-04-171-250/+0
| | | | | | | | | | | There were references to the skeleton because it was still updating items in the old namespace. This trims those out, however, doesn't clean up all the extra bits. That will be a subsequent commit. Fixes openbmc/openbmc#1425. Change-Id: Ibe9af614458bced70f478f70ffb5b5195034bc7e Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: Reuse ipmi bus for inventory-notifyPatrick Williams2017-03-311-3/+3
| | | | | | | Partially fixes openbmc/openbmc#875. Change-Id: Ieaaa65fa8432ffa873dcf2f4f96f9c1e09de3008 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Move object_mapper per dbus path conventions.Leonel Gonzalez2017-03-201-1/+1
| | | | | | | Partial fix for openbmc/openbmc#1112. Change-Id: I467a9ffa68d9539c5c1f71e2dfa3281a347d5951 Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
* React to inventory manager path changeBrad Bishop2017-02-231-1/+1
| | | | | | | | /xyz/openbmc_project/Inventory becomes /xyz/openbmc_project/inventory Change-Id: I95c1174b3cdbcd73a88c6bc004016e089c12f3e4 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* inventory: update extra propertiesDeepak Kodihalli2017-02-221-16/+32
| | | | | Change-Id: I8b403f07855cccb001eb63d6c5f11c5e1f58c874 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Inventory: Implement writing custom IPMI FRU propertyRatan Gupta2017-02-201-2/+34
| | | | | Change-Id: I9286045c3c10cd8bed840f03cfcc92a5b236d9ca Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Fix FRU area checkDeepak Kodihalli2017-02-141-4/+2
| | | | | | | | One of the IPMI FRU area checks deals with the old openbmc skeleton interfaces, which is no longer valid. Fixed that. Change-Id: Id406d4967d130136d4ac2a8efff94dac65d7ee0e Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* inventory : adhere to change in PIM Notify()Ratan Gupta2017-02-141-24/+25
| | | | | Change-Id: I83efc8ad799aaa879525d84b97779d5b98f168c4 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create the generated FRU Map in cpp.Ratan Gupta2017-02-141-5/+10
| | | | | Change-Id: Id83220e5e2876f4112ba76d698b2062e2a08dd3d Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* rename frup.h -> frup.hppRatan Gupta2017-02-111-1/+1
| | | | | | | This header contains c++ code. Change-Id: I4bc6cf0ddfbdc6ac4d93580a5203bb59537bbb04 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* writefrudata : invoke inventory managerRatan Gupta2017-02-011-19/+65
| | | | | | | | | Make a call to the inventory manager to construct inventory objects for IPMI FRUs Change-Id: I4b36ecc85bc78214c9c47032bafd013f6ff27fe9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
OpenPOWER on IntegriCloud