summaryrefslogtreecommitdiffstats
path: root/storageaddsel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Only include ipmid/api.hpp for the new APIVernon Mauery2019-04-081-1/+1
| | | | | | | | | | | | | | After some feedback from users of the new IPMI API, they wanted to see two things: 1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to write new handlers 2) only require including ipmid/api.hpp (instead of ipmid/api.h) So now, by simply including ipmid/api.hpp instead of ipmid/api.h (deprecated), handlers incorporating the new IPMI API can be written. Change-Id: I446dcce70cff03d4ecc28c658292d052485f77fc Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* move types.hpp to ipmid/types.hpp for exportVernon Mauery2019-03-251-1/+1
| | | | | | | | | | types.hpp is required by utility.hpp, which is exported, so it needs to be exported as well. This moves it to the include/libipmid directory, changes the Makefile to export it, and changes all the files that include it so it can be found in the right place. Change-Id: I30ec365446e4de466c266ec4faa327478460ec05 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* eSEL: Remove code related to logging eSELTom Joseph2019-02-071-230/+0
| | | | | Change-Id: I5392202352c2baa70d61768cbaef9eb0e1faad56 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Create libipmid and libipmid-hostWilliam A. Kennington III2019-02-071-1/+1
| | | | | | | | | | | | | | | | | | | This starts a transition to common ipmid libraries that providers can link against. It will allow for a cleaner separation between common ipmid functionality and daemon type specific code. This is needed so we can resolve all of the symbols in the providers at link time instead of discovering bad linkage by building and running a full ipmi daemon. In future commits libraries will be packaged for libipmid and libipmid-host which provide all of the symbols used by the current set of ipmid providers. This is the first step, it just separates and renames the headers. Legacy symlinks are still kept around for compatability. It also adds stub libraries so that external users can start linking as intended. Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd Signed-off-by: William A. Kennington III <wak@google.com>
* Revert "eSEL: Remove unused code related to logging eSEL"Tom Joseph2019-02-041-0/+220
| | | | | | | | | | This reverts commit 54fad6de0541c2f98e9b511f1d30bbcbcd743db6. This commit is reverted because the mapping of D-Bus object path to sensor information is still needed. The mapping is needed to serve the SEL commands which translate D-Bus logging objects to SEL entries. Change-Id: I2505299671db1f0bd7f116ef0e2ca4a0273eead8
* eSEL: Remove unused code related to logging eSELTom Joseph2019-02-011-220/+0
| | | | | Change-Id: Ia9815102064d20795a44b8e6a7d8b324c280756c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* cleanup: scope reductionPatrick Venture2018-10-311-1/+1
| | | | | | | | | | | | | | [app/channel.cpp:102]: (style) The scope of the variable 'resp' can be reduced. [ipmisensor.cpp:310]: (style) The scope of the variable 'i' can be reduced. [ipmid.cpp:506]: (style) The scope of the variable 'num_handlers' can be reduced. [read_fru_data.cpp:82]: (style) The scope of the variable 'fruId' can be reduced. [sensorhandler.cpp:256]: (style) The scope of the variable 'p' can be reduced. [storageaddsel.cpp:68]: (style) The scope of the variable 'p' can be reduced. Also delete two extra vertical lines. Change-Id: I8e72f8e1d94381f456674abf523d2f2fbdd8046d Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: transition to find_ifPatrick Venture2018-10-171-9/+7
| | | | | | | | | | [utils.cpp:81]: (style) Consider using std::find_if algorithm instead of a raw loop. [storageaddsel.cpp:170]: (style) Consider using std::find_if algorithm instead of a raw loop. Change-Id: I7ebbb6428fbbae9196912837d2ac9820420b77df Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: c-style castingPatrick Venture2018-10-171-5/+2
| | | | | | | | | | | | | | | | [ipmisensor.cpp:308]: (style) C-style pointer casting [sensorhandler.cpp:302]: (style) C-style pointer casting [sensorhandler.cpp:376]: (style) C-style pointer casting [sensorhandler.cpp:404]: (style) C-style pointer casting [sensorhandler.cpp:405]: (style) C-style pointer casting [storageaddsel.cpp:157]: (style) C-style pointer casting [storageaddsel.cpp:187]: (style) C-style pointer casting Added missing const in reportSensorEventAssert and reportSensorEventDeassert as the *pTable->func(...) take the const pointer and the casting then was using the proper const casting. Change-Id: I54a591b4e5e678b8ec3cae2633617a5f7aac7a66 Signed-off-by: Patrick Venture <venture@google.com>
* replaced c headers with cpp where applicablePatrick Venture2018-09-251-1/+0
| | | | | Change-Id: I23a70eb540ccde5d2aba467426769feffb07b516 Signed-off-by: Patrick Venture <venture@google.com>
* rename headers to match stylePatrick Venture2018-09-251-4/+3
| | | | | | | | | | | | | | | | | | Moving headers from ".h" to ".hpp" Reworked the header inclusion a bit so that host-ipmid is treated as a library, and local headers aren't. renamed apphandler.h => apphandler.hpp renamed chassishandler.h => chassishandler.hpp renamed globalhandler.h => globalhandler.hpp renamed sensorhandler.h => sensorhandler.hpp renamed storageaddsel.h => storageaddsel.hpp renamed storagehandler.h => storagehandler.hpp renamed systemintfcmds.h => systemintfcmds.hpp Change-Id: I9d4ce3dd57e2e996800f9020a10cc10cdf2c3914 Signed-off-by: Patrick Venture <venture@google.com>
* add .clang-formatPatrick Venture2018-09-071-83/+93
| | | | | Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture <venture@google.com>
* Replace tabs with 4 spacesNagaraju Goruganti2018-04-181-117/+117
| | | | | | | replaced tabs with four spaces. Change-Id: Ib36bf7956a280921c45a7944a972c0f19fe39e5c Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Reducing IPMI logging footprintAditya Saripalli2018-04-181-8/+9
| | | | | | | | | | | | -host-ipmid is very noisy in terms of journal logging. A small step towards cleaning that up. -Also converted printfs to phosphor-logging. Partially Resolves openbmc/openbmc#2507 Change-Id: I749c19c18d1cabf6f0216830c8cb0a08ee43d6de Signed-off-by: Aditya Saripalli <aditya0124@gmail.com> Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Fix error level lookupDeepak Kodihalli2018-04-111-17/+23
| | | | | | | | | | | | | | The mapping between an error level in the esel to a phosphor-logging error level was broken. This commit fixes it. This commits also specifies the error level while calling the error report() API, so that error D-Bus objects reflect the right error level (as per the esel). Resolves openbmc/openbmc#3014. Change-Id: I9891d468d98d169f73275a3693df4f3a2166001d Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Commit a MaintenanceProcedure log entry on a 0xDE SEL recordTom Joseph2017-11-031-0/+45
| | | | | | | | | | | | In the case of a procedure callout, HB sends a eSEL of 0xDF type. It is followed by a Add SEL record with OEM record type 0xDE and byte 11 in the record indicate the procedure associated with the eSEL. Resolves openbmc/openbmc#2368 Change-Id: Ia57f423c9d533cd8968b613d7522b409a9820198 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Fixed the duplicated event string in error messageMarri Devender Rao2017-11-031-2/+2
| | | | | | | | | | The message for the host event was org.open_power.Host.Event.Error.Event, it is corrected to org.open_power.Host.Error.Event. Resolves openbmc/openbmc#1960 Change-Id: I86304b1f2e4bec740e2e9ec58f98ea9df0d752ea Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Spelling fixesGunnar Mills2017-10-311-1/+1
| | | | | | | | | 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: I78e9d126f19fd9fb2e3f2fa9fe8c2404dc505f82 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add inventory path metadata to host event log entryTom Joseph2017-07-251-19/+34
| | | | | | | | | | | | | | | | | | | | | | The ESEL data contains sensor number to related to the event. The generated code maps sensor number to inventory path. The inventory path is added as metadata to the log entry for the admin to figure out the inventory affected by the system event. The generated header for Host event exception type is generated in the org/open_power/Host/Event/error.hpp. Phosphor repositories should not include open power specific header files. The eventual plan to is to move the code to add ESEL to an OEM repo, till then we would check in the header file in the repo. TODO: openbmc/openbmc#1658 The elog-errors.hpp is checked in for the CI to pass. TODO: openbmc/openbmc#1772 issue would take care, so that CI passes without the checking in elog-errors.hpp. Resolves openbmc/openbmc#1920 Change-Id: I31d68de475ef84b8755c5de6d7ce6d311dd32214 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sensorhandler: Refactor find_openbmc_path to check sensor map firstEmily Shaffer2017-06-061-2/+2
| | | | | Change-Id: I846d538643af77705d5160bf4d9127f758b5c749 Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
* storageaddesel: switch to 'report' error APIMarri Devender Rao2017-04-271-11/+2
| | | | | | | | | phosphor-logging now has an interface to avoid needing a try/catch to report an error in the same location it is discovered, so switch to using it. Change-Id: I3feb36e41e8dd18a279b34508f8967a4f74485e4 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Cater for change in exception variable namesMarri Devender Rao2017-04-121-1/+1
| | | | | Change-Id: I9c723dd8c1c411c297906fcce635e32b3d8428cc Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* error-log: catch sdbusplus exception typeDeepak Kodihalli2017-03-161-2/+2
| | | | | Change-Id: Ied012155c8382e1077521613a8a49d61c4becc6b Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Add null termination for eSEL dataTom Joseph2017-02-281-1/+3
| | | | | Change-Id: If55367f35cfcf35f0dff8da2d1e15865b702a5b2 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Import phosphor-logging header files from new directory.Saqib Khan2017-02-221-2/+2
| | | | | | | | | Phase2: Changing the phosphor-logging header files import from base dir to files under phosphor-logging folder. Once all projects import from the new dir, the files in the base dir will be deleted. Change-Id: If45e9d29056c66e2c4b03a6ca20580f30b69741f Signed-off-by: Saqib Khan <khansa@us.ibm.com>
* add_sel: Remove deprecated calls to dbusAdriana Kobylak2017-02-161-53/+1
| | | | | | | | | The current add_sel dbus calls are failing, openbmc/openbmc#1111 Remove them as they are deprecated as the function already creates an elog error entry using the new logging interface. Change-Id: I3616496420b539bbb7ea5b3fe0c3841d655df238 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Create a SEL error logAdriana Kobylak2017-02-161-0/+23
| | | | | | | | Log the SEL data to the journal and call the commit interface to write the error log with the data. Change-Id: Ifcb842e37f2fdb14f80ab24651d565da05da47bf Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Correct compilation errorsMatthew Barth2017-01-251-5/+10
| | | | | | | | | | Fix compilation errors found with later gcc version during integration unit tests. Resolves openbmc/phosphor-host-ipmid#101 Change-Id: I35c5433f03521a877fd09748b8262d6172d21535 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Print failing object path after failed bus lookupBrad Bishop2016-10-061-1/+2
| | | | | Change-Id: I599d8297b4d2fd45831443685ea5b7d53f1515b6 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Refactor the code related to Sensor handlingTom2016-09-231-5/+3
| | | | | | | | | The sensor related code is moved to sensorhandler.c. These changes were part of the ipmi daemon code and would have to replicated in RMCP daemon. The refactoring would get away with those changes. Change-Id: Ib9e1a1929282221e6f259e4a54502eea82f42939 Signed-off-by: Tom <tomjoseph@in.ibm.com>
* Ensure all tools are building with -Wall and -WerrorMatthew Barth2016-09-211-3/+3
| | | | | | | | Corrected resulting compiler errors from correctly adding -Wall & -Werror within configure.ac. Change-Id: Ia7aaafa83103322ad4b50171d62144624dd71e42 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* ipmid: Change .H -> .hppPatrick Williams2016-09-061-1/+1
| | | | | Change-Id: Ia1ed05a533736105909717b86f16274b30d36401 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Hard-coded service name replaced with call to ObjectMapperSergey Solomin2016-08-251-4/+11
| | | | | | | | | | | | | In the openbmc code, the dbus service name is hardcoded. The ObjectMapper provides a way to find out the service name by issuing a GetObject method call to the ObjectMapper. That functionality is implemented in mapper.c The output of the call to the mapper is a service name. Resolves openbmc/openbmc#319. Change-Id: I724a31ede6bdf3ae4b361e730857b1f2696a8966 Signed-off-by: Sergey Solomin <sergey.solomin@us.ibm.com>
* Switch C++ source files to .cpp extensionMatthew Barth2016-08-081-0/+253
Change-Id: I495186b4afd58ec1e5d9d5c6472394f96541d17d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
OpenPOWER on IntegriCloud