History log of /openbmc/phosphor-inventory-manager/utils.hpp (Results 1 – 18 of 18)
Revision Date Author Comments
# 7edafe06 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I657f0cb5283a0b4177332d94a88af660f3de8f11
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# a18caeaa 09-Jun-2022 Santosh Puranik <santosh.puranik@in.ibm.com>

utils: Fix bad conversion for enumerations

When an interface contains both a string and an enumeration (or multiple
of each), the variant visitor matches the wrong make specialization.

This is beca

utils: Fix bad conversion for enumerations

When an interface contains both a string and an enumeration (or multiple
of each), the variant visitor matches the wrong make specialization.

This is because a string is convertible to variant<string, enum, ...>.
Fix this by moving out all conversions from a string to the template
specialization that first checks if the string can be converted to
an enumeration.

This still leaves a hole where trying to set a fully-qualified
enumeration name to a string property will fail, but I am not sure what
to do about that within the current PIM framework.

Tested: Tested Notify with enumerations on interfaces that contain both
a string and an enumeration.

Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: I58b93a225ccf0b6b70317b2a2050a4dfa2b1b6f7

show more ...


# 23314a5c 13-Apr-2022 George Liu <liuxiwei@inspur.com>

meson: Eliminate warning messages

Eliminate `[-Werror=unused-parameter]` warning message

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: If4f8aee3ce71b5c6e6ad1d168859c03bd7bfa933


# 706a9fcc 16-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

utils: allow conversion from string to dbus enum

Enhance the variant visitor to leverage functionality in sdbusplus
that allows conversion of strings to enums (or variants containing

utils: allow conversion from string to dbus enum

Enhance the variant visitor to leverage functionality in sdbusplus
that allows conversion of strings to enums (or variants containing
enums). This will allow a seem-less transition for Inventory
properties which are defined as string and then transition to
enumerations, such as that introduced by [1].

Tested: Booted Witherspoon in QEMU with [1] and [2]. Confirmed PIM
no longer coredumps and successfully converts the string to an
enumeration.

1. https://github.com/openbmc/phosphor-dbus-interfaces/commit/178cae08d6b79eac7cf3eca963526eeefc53a5af
2. https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/45005

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I341d3c6ffc0d36e63444c63351012ac487b171ef

show more ...


# 4ccd3960 13-Jul-2021 Patrick Williams <patrick@stwcx.xyz>

utils: improve exception string with variant types

The variant visitor raises an exception if the variant cannot be
properly converted, but previously gave no indication as to what the

utils: improve exception string with variant types

The variant visitor raises an exception if the variant cannot be
properly converted, but previously gave no indication as to what the
failing type conversion was. Add the use of `__PRETTY_FUNCTION` to the
exception string so that the types are recorded in the exception.

This results in an exception like:

Invalid conversion in MakeVariantVisitor::static auto
phosphor::inventory::manager::MakeVariantVisitor<V>::Make<T, Arg,
Enable>::make(Arg&&) [with T = std::variant<sdbusplus::xyz::openbmc_project::Inventory::Item::server::Chassis::ChassisType>;
Arg = const std::__cxx11::basic_string<char>&; Enable = void;
V = std::variant<sdbusplus::xyz::openbmc_project::Inventory::Item::server::Chassis::ChassisType>]

Instead of the previous exception which simply stated:

Invalid conversion in MakeVariantVisitor

It would probably be better to use C++20's std::source_location but the
autotools structure currently in place does not allow simple usage of
C++20.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I59e0ce0d6899a88e1e711a7921c0d12290fa4995

show more ...


# a83db30e 06-Dec-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

style: update clang-format

Pull the most recent OpenBMC style rules and run clang-format.

Change-Id: I11a25ea1e62d6c739010d9dd742a139fb17cc09a
Signed-off-by: Brad Bishop <bradle

style: update clang-format

Pull the most recent OpenBMC style rules and run clang-format.

Change-Id: I11a25ea1e62d6c739010d9dd742a139fb17cc09a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 26f8668d 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: remove deprecated variant_ns

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I8ae0323c7eabb6c0cde2126b07a7396b4e3e17ea


# d3d188d5 11-Dec-2018 Brad Bishop <bradleyb@fuzziesquirrel.com>

utils: Add missing headers

Add a few missing headers from utils.hpp.

Change-Id: I6efbceac3f583349e1db5b9135bd05da0270878e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>


# 6e94b652 06-Nov-2018 William A. Kennington III <wak@google.com>

Fix std::variant usage

This change makes it possible to use std::variant as a drop in
replacement for mapbox::variant.

Change-Id: Ia729c3a7832eec4dd6cddadba9bc160b6ba9ad90
S

Fix std::variant usage

This change makes it possible to use std::variant as a drop in
replacement for mapbox::variant.

Change-Id: Ia729c3a7832eec4dd6cddadba9bc160b6ba9ad90
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# a680d1ef 14-Oct-2018 Patrick Venture <venture@google.com>

formatter: update clang-format and fix-up file(s)

clang-format-6.0 introduced new changes, also then updates to
.clang-format introduce more new changes.

Change-Id: Iec9f84e3a7a

formatter: update clang-format and fix-up file(s)

clang-format-6.0 introduced new changes, also then updates to
.clang-format introduce more new changes.

Change-Id: Iec9f84e3a7a5bf254d66eee46cdc9b3070e06687
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# 615b2a8f 29-Mar-2018 Brad Bishop <bradleyb@fuzziesquirrel.com>

Enable clang-format

Fix up problems and enable clang-format during CI builds.

Change-Id: Ia5c88281f7090c0aa09ba586d968f1fcd8aba4f1
Signed-off-by: Brad Bishop <bradleyb@fuzziesqu

Enable clang-format

Fix up problems and enable clang-format during CI builds.

Change-Id: Ia5c88281f7090c0aa09ba586d968f1fcd8aba4f1
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 86521587 15-Feb-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Add comparison utilities

Add some utilities for comparing paths and pair
elements.

Change-Id: Ica5f90381160ffb8ee4358662536815a2a9ce2f6
Signed-off-by: Brad Bishop <bradleyb@

Add comparison utilities

Add some utilities for comparing paths and pair
elements.

Change-Id: Ica5f90381160ffb8ee4358662536815a2a9ce2f6
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 9bbfcb18 04-Feb-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Set properties when constructing interfaces.

Make use of new sdbusplus support for passing a map
of properties and their values to the interface
constructor.

Change-Id: Ib0d

Set properties when constructing interfaces.

Make use of new sdbusplus support for passing a map
of properties and their values to the interface
constructor.

Change-Id: Ib0dd406fd80c89acb723e3a376af26ba57b53d27
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 150147ae 08-Feb-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Use std::any

Replace holder types with std::any.

Change-Id: I0cd8c2804ad4bff79a0cfe93589e699afb095e5f
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>


# 07934a64 08-Feb-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Use std::function

Replace CallableHolder with std::function. No need to re-invent
the wheel.

Change-Id: I2647a802237dba4a48187718f0d3da59e97575d7
Signed-off-by: Brad Bishop

Use std::function

Replace CallableHolder with std::function. No need to re-invent
the wheel.

Change-Id: I2647a802237dba4a48187718f0d3da59e97575d7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 7b33777b 12-Jan-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Run astyle

Change-Id: Iec4802e9837465a7deb1fd7fd57a2068cc18c50d
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>


# b83a21ea 30-Nov-2016 Brad Bishop <bradleyb@fuzziesquirrel.com>

Add interface exposing utility functions

Add utility functions enabling easy method calls on sdbusplus interface
binding objects.

Change-Id: Ie1d01f82604406705869fea0ec19d84c95d

Add interface exposing utility functions

Add utility functions enabling easy method calls on sdbusplus interface
binding objects.

Change-Id: Ie1d01f82604406705869fea0ec19d84c95d90474
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 65ffffa9 29-Nov-2016 Brad Bishop <bradleyb@fuzziesquirrel.com>

Removed duplicated Holder adapters

Refactor copy/pasted action/filter/interface object
adapter types into a single templated framework.

Change-Id: Iafbd814572a7db13fddc5314617e3

Removed duplicated Holder adapters

Refactor copy/pasted action/filter/interface object
adapter types into a single templated framework.

Change-Id: Iafbd814572a7db13fddc5314617e310fe5f0a062
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...