summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* build: install into bin instead of sbinHEADmasterPatrick Venture2019-03-281-1/+1
| | | | | | | Installs into bin instead of sbin per guidelines. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ifbf3b709c08bbd892060291530a906e88430f5be
* transition to cli11 instead of custom arg parserPatrick Venture2019-03-285-160/+17
| | | | | | | | | Transition to use cli11 for argument parsing instead of a custom argument parser. Tested: Not tested on hardware. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I9c516c8c2d76e35c6c31592f96e8f281e9d47ad6
* add autom4te.cache/ to .gitignorePatrick Venture2019-03-281-0/+1
| | | | | | | | Add missing "autom4te.cache/" to .gitignore file. Tested: Not tested on hardware. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ie06d1b22bb2a74e2f6e2901d213fffa0cacac2c4
* Convert host-ipmid -> libipmidWilliam A. Kennington III2019-02-194-5/+8
| | | | | | | | | 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>
* build: pkg anti-pattern: use defaultsPatrick Venture2019-02-131-4/+2
| | | | | | | | Use the defaults in the pkg check where the default error message is sufficient to identify which package is missing. Change-Id: Iccc91bcdd4ad57980a4731184b448936c1968f85 Signed-off-by: Patrick Venture <venture@google.com>
* readeeprom: Allow FRU ID 0 to be selectedOskar Senft2019-02-111-7/+40
| | | | | | | | | | | | | | | | | | | | | | | We incorrectly checked that FRU ID != 0, which is the default FRU ID. Actually, the IPMI spec specifies FRU ID 0xff as reserved, so the check was changed to prevent that ID from being used instead. Split out fruid parsing code to its own function to cover various edge and failure cases. Tested: Ran 'phosphor-read-eeprom --eeprom fru.bin --fruid=0' and checked that values are reported to inventory as expected. Ran with '--fruid=ff' ('invalid' FRU ID): rejected Ran with '--fruid=xx' (non-HEX FRU ID): rejected Ran with '--fruid=100' (out-of-range FRU ID): rejected Ran with '--fruid="0 0"' (invalid number): rejected Ran with '--fruid=10.0' (non-integer): rejected Ran with '--fruid=0x12' (valid HEX FRU ID): accepted Ran with '--fruid=fe' (valid HEX FRU ID): accepted Change-Id: Ic1fb79cefc6931f21d0b5cb4363ad5fd44f47c92 Signed-off-by: Oskar Senft <osk@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>
* frup: gcc8: swap abusive use strncpy w/ memcpyBrad Bishop2018-11-211-1/+1
| | | | | | | | | | | | Fix the following warning under gcc8: | ../git/frup.cpp: In function 'void _append_to_dict(uint8_t, uint8_t*, IPMIFruInfo&)': | ../git/frup.cpp:664:24: error: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying 2 bytes from a string of the same length [-Werror=stringop-truncation] | strncpy(bin_in_ascii, "0x", 2); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Ia35d0ae733f0879f6c9d23126bab5fc899e89def Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.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>
* IPMIFruArea: Add doxygen to classPatrick Venture2018-10-312-18/+49
| | | | | | | Add doxygen to IPMIFruArea class. Change-Id: Ie28dd84c25df939671771741d7e4faca931e613e 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-303-44/+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>
* IPMIFruArea: use default destructorPatrick Venture2018-10-302-10/+1
| | | | | | | Use default destructor now that there isn't a raw pointer. Change-Id: I3b28a99ca27a9e5dd15de9809e882cab02eedf75 Signed-off-by: Patrick Venture <venture@google.com>
* IPMIFruArea: use vector instead of raw byte pointerPatrick Venture2018-10-302-15/+6
| | | | | | | Use vector of bytes instead of raw byte pointer. Change-Id: I20a2beec3cbbc44c8cc3a48cefd73f3f27bdcc8f 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>
* IPMIFruArea: rename member variables per openbmc stylePatrick Venture2018-10-302-18/+18
| | | | | | | | OpenBMC style dictates member variables be lower camel and not snake case. Change-Id: I3e217b51f910612c3e5ecf1480340a27ef29d774 Signed-off-by: Patrick Venture <venture@google.com>
* build: set language to C++Patrick Venture2018-10-301-0/+1
| | | | | | | Set the language in the build to C++. Change-Id: Iaf56356269617c0546d2b42a225bf8732fe6356c Signed-off-by: Patrick Venture <venture@google.com>
* MAINTAINERS: Update Emily's IRC nickEmily Shaffer2018-10-301-1/+1
| | | | | Change-Id: I56b9100c0d7ee8bee84c00eba4fd0d0899aa50e8 Signed-off-by: Emily Shaffer <emilyshaffer@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>
* strgfnhandler: rename function per openbmc style guidePatrick Venture2018-10-291-6/+6
| | | | | | | Function names should be lower camel and not snake case. Change-Id: I6f8683850ce017e63641415846e8a0f031fccba7 Signed-off-by: Patrick Venture <venture@google.com>
* strgfnhandler: rename all variables per openbmc stylePatrick Venture2018-10-291-14/+14
| | | | | | | OpenBMC style declares variables be lower camel and not snake case. Change-Id: I4a448b84ae3d930049d4cb761216459799a698fa Signed-off-by: Patrick Venture <venture@google.com>
* writefrudata: rename all variables per openbmc stylePatrick Venture2018-10-292-97/+95
| | | | | | | 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-294-28/+14
| | | | | | | 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>
* IPMIFruArea: delete default constructorPatrick Venture2018-10-291-3/+2
| | | | | | | Default constructor marked private, but should be deleted. Change-Id: I324516c51bd5f59b68284d9adcbf117cd74115af 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-293-28/+28
| | | | | | | Apply naming convention to member functions. Change-Id: I3b0516592dd4225f7be43c3d9cdcc9c8853d20b7 Signed-off-by: Patrick Venture <venture@google.com>
* IPMIFruArea: move private area under publicPatrick Venture2018-10-291-37/+37
| | | | | | | | For standard readability a class is typically written with public preceding private. Change-Id: Icdce1ee8426d651293d16f9a1ba16176a3f767c3 Signed-off-by: Patrick Venture <venture@google.com>
* IPMIFruArea: drop iv prefix from membersPatrick Venture2018-10-292-46/+46
| | | | | | | | | Drop iv_ prefix from class members. Renamed class members where necessary and updated some method parameters to avoid name conflicts. Change-Id: Id888dab9fcc020c4dff68d689a38f869c0de3525 Signed-off-by: Patrick Venture <venture@google.com>
* IPMIFruArea: drop unused member methodsPatrick Venture2018-10-291-18/+0
| | | | | | | Drop unused member methods. Change-Id: I1bf78f8a896173deacc0f55e3e3b8f1f0c64302a Signed-off-by: Patrick Venture <venture@google.com>
* IPMIFruArea: move assignments to constructor listPatrick Venture2018-10-291-8/+3
| | | | | | | Move member assignment to constructor list. Change-Id: I140aabc92533c07f6c50eb19a323e6c52dbf43a4 Signed-off-by: Patrick Venture <venture@google.com>
* IPMIFruArea: move source into separate fru_area.cppPatrick Venture2018-10-293-74/+84
| | | | | | | Move the implementation of the class into its own source file. Change-Id: I02d941dd8173f0cede8cdfe8af1fdc5f5418abb4 Signed-off-by: Patrick Venture <venture@google.com>
* fru_area: cleanup headersPatrick Venture2018-10-291-4/+3
| | | | | | | | Cleanup headers, dropping sd-bus header and c-headers. Add in cstdint for uint8_t. Change-Id: I751478a83ac807b688bb9b7d9efff2efc7578a4a Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: rename fru_area_vec_t type and use usingPatrick Venture2018-10-292-7/+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-292-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-202-15/+15
| | | | | | | | | | 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-202-7/+3
| | | | | | | Drop unused sd_bus pointer from fru_info class. Change-Id: Id93412c17d15118e8e6f66736c9dc74289392fa4 Signed-off-by: Patrick Venture <venture@google.com>
* ipmi_fru: drop unused member functionsPatrick Venture2018-10-201-9/+0
| | | | | | | Drop unused member functions from fru_info class. Change-Id: Iedf108979892cf12639652bd649efb5c2d7a74ef 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-204-7/+6
| | | | | | | | 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>
OpenPOWER on IntegriCloud