History log of /openbmc/sdbusplus/src/ (Results 51 – 69 of 69)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
a7ac313c19-Nov-2021 Patrick Williams <patrick@stwcx.xyz>

slot: explicitly transfer pointer

The slot class is intended to be an RAII wrapper around the C-style
`sd_bus_slot*`. As part of the constructor it gets the pointer it is
assuming ownership for.

T

slot: explicitly transfer pointer

The slot class is intended to be an RAII wrapper around the C-style
`sd_bus_slot*`. As part of the constructor it gets the pointer it is
assuming ownership for.

The previous constructor took the `sd_bus_slot*` by value so it was
possible that the caller still kept the slot rather than fully
transferring ownership. Switch the constructor to an r-value reference
so that the caller's pointer can be erased as part of the ownership
transfer.

Also, add an assignment operator to simplify the syntax when a slot is
first initialized with `nullptr` and then later given ownership of a
newly constructed slot.

While this is an incompatible constructor change, it is not expected to
affect any current users. The only example of referencing a
`slot::slot` I could see in the current OpenBMC org calls the
constructor with a `nullptr`, which will seamlessly call the new r-value
variant.

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

show more ...

a735ca5c19-Nov-2021 Patrick Williams <patrick@stwcx.xyz>

vtable: shorten vtable type

Create an alias `sdbusplus::vtable_t` to `sdbusplus::vtable::vtable_t`
to reduce duplication.

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

vtable: shorten vtable type

Create an alias `sdbusplus::vtable_t` to `sdbusplus::vtable::vtable_t`
to reduce duplication.

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

show more ...

0f282c4819-Nov-2021 Patrick Williams <patrick@stwcx.xyz>

bus: shorten bus type

Create an alias `sdbusplus::bus_t` to `sdbusplus::bus::bus` to reduce
duplication.

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

bus: shorten bus type

Create an alias `sdbusplus::bus_t` to `sdbusplus::bus::bus` to reduce
duplication.

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

show more ...

10d7aa1219-Nov-2021 Patrick Williams <patrick@stwcx.xyz>

message: shorten message type

Create an alias `sdbusplus::message_t` to `sdbusplus::message::message`
to reduce duplication.

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

message: shorten message type

Create an alias `sdbusplus::message_t` to `sdbusplus::message::message`
to reduce duplication.

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

show more ...

6d83cf5319-Oct-2021 Szymon Dompke <szymon.dompke@intel.com>

Add non-throwing version of unpackProperties

Some projects (e.g., bmcweb) don't use functions which throw exceptions.
This change introduces unpackPropertiesNoThrow() function, which returns
optiona

Add non-throwing version of unpackProperties

Some projects (e.g., bmcweb) don't use functions which throw exceptions.
This change introduces unpackPropertiesNoThrow() function, which returns
optional string. In case of mismatched type or missing property, it will
contain its name. In case of no errors, std::nullopt will be returned.

As a side change, message returned by UnpackPropertyError::what() now
also includes propertyName and reason.

Testing done:
- Added unit tests for unpackPropertiesNoThrow().
- unpackProperties() functionality remained the same.

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I61318bb906de7d5a252414c1d3ea25322874e23e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

a8e3502c28-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: ensure base exception vtable is non-hidden

I found that when building this library under Yocto, `-flto=auto` is
used by default and the vtable for the exception class ends up becoming
hid

exception: ensure base exception vtable is non-hidden

I found that when building this library under Yocto, `-flto=auto` is
used by default and the vtable for the exception class ends up becoming
hidden (since there are no non-pure/non-inline functions). I've tried
using `__attribute__((visibility("default")))` with no luck. The only
thing which seems to work is defining some non-inline function to force
the vtable to be emitted.

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

show more ...

b68700e809-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: make base get_errno pure virtual

In order to enforce that exception authors make an explicit decision
on the errno, switch get_errno to pure virtual.

Signed-off-by: Patrick Williams <pat

exception: make base get_errno pure virtual

In order to enforce that exception authors make an explicit decision
on the errno, switch get_errno to pure virtual.

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

show more ...

1522866303-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: create subclass for generated errors

All errors generated by sdbus++ YAML we want to follow the systemd
default errno value (EIO). All exceptions defined otherwise it is
probably a good

exception: create subclass for generated errors

All errors generated by sdbus++ YAML we want to follow the systemd
default errno value (EIO). All exceptions defined otherwise it is
probably a good idea to ensure that the author picks an explicit
errno.

Create a base class for generated exceptions to hold the default
`get_errno() { return EIO; }` implementation, which can be used by
various repositories and later turn the exception_t one into a pure
virtual.

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

show more ...

bd372ecb02-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: add errno for internal errors

Assign errnos for InvalidEnumString and UnpackPropertyError.

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

exception: add errno for internal errors

Assign errnos for InvalidEnumString and UnpackPropertyError.

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

show more ...

b6f729d602-Sep-2021 Patrick Williams <patrick@stwcx.xyz>

exception: add errno for all exceptions

sd_bus maintains an errno for all exceptions. There are some
users of the library that are catching an SdBusError because they
want an easy way to change to

exception: add errno for all exceptions

sd_bus maintains an errno for all exceptions. There are some
users of the library that are catching an SdBusError because they
want an easy way to change to an errno, but as a result they are
potentially missing exceptions. Add the `get_errno` method into
our base exception object and return the same default that sd_bus
uses: EIO.

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

show more ...

0c8136a428-Aug-2021 Patrick Williams <patrick@stwcx.xyz>

enable building with clang

Clang is more pedantic about systemd's use of C99 extensions when
high warning levels are enabled. Disable the "-Wc99-extensions"
when using the SD_BUS_ERROR_NULL macro f

enable building with clang

Clang is more pedantic about systemd's use of C99 extensions when
high warning levels are enabled. Disable the "-Wc99-extensions"
when using the SD_BUS_ERROR_NULL macro from systemd. This enables
sdbusplus to compile with clang.

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

show more ...

2dcf64bf30-Jul-2021 William A. Kennington III <wak@google.com>

native_types: Use int8_t instead of char

Technically a char is signed, but the compiler warns about using -1 char
values. int8_t is the intended type here.

Change-Id: I888aef3bff9b585beed7d0ebc0e75

native_types: Use int8_t instead of char

Technically a char is signed, but the compiler warns about using -1 char
values. int8_t is the intended type here.

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

show more ...

2bba553d27-May-2021 William A. Kennington III <wak@google.com>

message/native_types: Constexpr fix in c++17 mode

If we don't initialize the array at declaration time, we can't consider
the function constexpr as the values could be non-deterministic.

Change-Id:

message/native_types: Constexpr fix in c++17 mode

If we don't initialize the array at declaration time, we can't consider
the function constexpr as the values could be non-deterministic.

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

show more ...

8db46a0f05-May-2021 William A. Kennington III <wak@google.com>

native_types: string_path_wrapper: Don't escape all strings

Not all strings require escaping when appending them to a path. This
allows us to now append `openbmc_project` to `/xyz` and have
expected

native_types: string_path_wrapper: Don't escape all strings

Not all strings require escaping when appending them to a path. This
allows us to now append `openbmc_project` to `/xyz` and have
expected behavior.

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

show more ...

285f78b101-May-2021 William A. Kennington III <wak@google.com>

native_types: Reduce append allocation

This builds the string from left to right, instead of dealing with
string inserts, optimizing for allocations. Uses our own hex encoder
instead of relying on s

native_types: Reduce append allocation

This builds the string from left to right, instead of dealing with
string inserts, optimizing for allocations. Uses our own hex encoder
instead of relying on systemd libraries. This maintains explicit
compatability with the systemd encoding scheme.

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

show more ...

226bc42a05-May-2021 William A. Kennington III <wak@google.com>

native_types: Migrate large functions to shared lib

This speeds up compilation of changes and should save space in users of
the functions.

Change-Id: Iee9029800c11dcd4e94f165766836bae327ee9b5
Signe

native_types: Migrate large functions to shared lib

This speeds up compilation of changes and should save space in users of
the functions.

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

show more ...

32ffb03d12-Oct-2020 Patrick Williams <patrick@stwcx.xyz>

server: un-inline various large functions

Save approximiately 70k (ARM32) of size from the generated library of
libphosphor-dbus.so by un-inlining various large functions.

Signed-off-by: Patrick Wi

server: un-inline various large functions

Save approximiately 70k (ARM32) of size from the generated library of
libphosphor-dbus.so by un-inlining various large functions.

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

show more ...


/openbmc/sdbusplus/MAINTAINERS
/openbmc/sdbusplus/docs/interface.md
/openbmc/sdbusplus/example/get-all-properties.cpp
/openbmc/sdbusplus/example/register-property.cpp
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/property.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/message/append.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/message/read.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbuspp_support/server.hpp
/openbmc/sdbusplus/include/sdbusplus/server/interface.hpp
/openbmc/sdbusplus/include/sdbusplus/server/transaction.hpp
/openbmc/sdbusplus/include/sdbusplus/test/sdbus_mock.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/dedup_variant.hpp
/openbmc/sdbusplus/meson.build
bus.cpp
server/interface.cpp
server/transaction.cpp
/openbmc/sdbusplus/test/message/types.cpp
/openbmc/sdbusplus/test/server/Test.interface.yaml
/openbmc/sdbusplus/test/server/object.cpp
/openbmc/sdbusplus/test/utility/type_traits.cpp
/openbmc/sdbusplus/tools/sdbus++-gen-meson
/openbmc/sdbusplus/tools/sdbusplus/interface.py
/openbmc/sdbusplus/tools/sdbusplus/method.py
/openbmc/sdbusplus/tools/sdbusplus/property.py
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.prototype.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.prototype.hpp.mako
/openbmc/sdbusplus/tools/setup.py
09b88f2602-Sep-2020 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

Added utility functions getAllProperties and unpackProperties

Tested:
- Added example to verify that functions work correctly
- Added new unit tests that are passing
- All other tests are stil

Added utility functions getAllProperties and unpackProperties

Tested:
- Added example to verify that functions work correctly
- Added new unit tests that are passing
- All other tests are still passing after this change
- Added handling of new type (std::monostate) which can
be used as first type in variant to represent that none
of the other types was matched

Change-Id: Ic8e7c8d3116d64b94be37147ae8a80ebb5d3811d
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


/openbmc/sdbusplus/.clang-ignore
/openbmc/sdbusplus/.gitignore
/openbmc/sdbusplus/.shellcheck
/openbmc/sdbusplus/README.md
/openbmc/sdbusplus/docs/interface.md
/openbmc/sdbusplus/example/get-all-properties.cpp
/openbmc/sdbusplus/example/meson.build
/openbmc/sdbusplus/example/register-property.cpp
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/detail/async_send_handler.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/get_all_properties.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/sd_event.hpp
/openbmc/sdbusplus/include/sdbusplus/exception.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/message/read.hpp
/openbmc/sdbusplus/include/sdbusplus/message/types.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/include/sdbusplus/test/sdbus_mock.hpp
/openbmc/sdbusplus/include/sdbusplus/unpack_properties.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/vtable.hpp
/openbmc/sdbusplus/meson.build
/openbmc/sdbusplus/meson_options.txt
/openbmc/sdbusplus/setup.cfg
exception.cpp
/openbmc/sdbusplus/subprojects/googletest.wrap
/openbmc/sdbusplus/test/bus/aio.cpp
/openbmc/sdbusplus/test/meson.build
/openbmc/sdbusplus/test/message/append.cpp
/openbmc/sdbusplus/test/message/read.cpp
/openbmc/sdbusplus/test/message/types.cpp
/openbmc/sdbusplus/test/server/Test.interface.yaml
/openbmc/sdbusplus/test/timer.cpp
/openbmc/sdbusplus/test/unpack_properties.cpp
/openbmc/sdbusplus/test/utility/type_traits.cpp
/openbmc/sdbusplus/tools/meson.build
/openbmc/sdbusplus/tools/sdbus++
/openbmc/sdbusplus/tools/sdbus++-gen-meson
/openbmc/sdbusplus/tools/sdbus++-gendir
/openbmc/sdbusplus/tools/sdbusplus/enum.py
/openbmc/sdbusplus/tools/sdbusplus/interface.py
/openbmc/sdbusplus/tools/sdbusplus/main.py
/openbmc/sdbusplus/tools/sdbusplus/namedelement.py
/openbmc/sdbusplus/tools/sdbusplus/property.py
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.prototype.hpp.mako
/openbmc/sdbusplus/tools/setup.py
7f66425404-Jun-2020 Patrick Williams <patrick@stwcx.xyz>

build: split source and header directories

Split the headers and source to simplify the install_header
directive such that we no longer need to specify cpp files
to exclude in the install_header cal

build: split source and header directories

Split the headers and source to simplify the install_header
directive such that we no longer need to specify cpp files
to exclude in the install_header call.

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

show more ...


/openbmc/sdbusplus/.clang-format
/openbmc/sdbusplus/.gitignore
/openbmc/sdbusplus/LICENSE
/openbmc/sdbusplus/MAINTAINERS
/openbmc/sdbusplus/README.md
/openbmc/sdbusplus/docs/error.md
/openbmc/sdbusplus/docs/interface.md
/openbmc/sdbusplus/example/asio-example.cpp
/openbmc/sdbusplus/example/calculator-server.cpp
/openbmc/sdbusplus/example/list-users.cpp
/openbmc/sdbusplus/example/meson.build
/openbmc/sdbusplus/example/net/poettering/Calculator.errors.yaml
/openbmc/sdbusplus/example/net/poettering/Calculator.interface.yaml
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/detail/async_send_handler.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/sd_event.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/bus/match.hpp
/openbmc/sdbusplus/include/sdbusplus/exception.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/message/append.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/message/read.hpp
/openbmc/sdbusplus/include/sdbusplus/message/types.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/include/sdbusplus/server.hpp
/openbmc/sdbusplus/include/sdbusplus/server/README.md
/openbmc/sdbusplus/include/sdbusplus/server/bindings.hpp
/openbmc/sdbusplus/include/sdbusplus/server/interface.hpp
/openbmc/sdbusplus/include/sdbusplus/server/manager.hpp
/openbmc/sdbusplus/include/sdbusplus/server/object.hpp
/openbmc/sdbusplus/include/sdbusplus/server/transaction.hpp
/openbmc/sdbusplus/include/sdbusplus/slot.hpp
/openbmc/sdbusplus/include/sdbusplus/test/sdbus_mock.hpp
/openbmc/sdbusplus/include/sdbusplus/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/container_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/read_into_tuple.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/tuple_to_array.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/vtable.hpp
/openbmc/sdbusplus/meson.build
exception.cpp
sdbus.cpp
server/transaction.cpp
/openbmc/sdbusplus/test/bus/list_names.cpp
/openbmc/sdbusplus/test/bus/match.cpp
/openbmc/sdbusplus/test/exception/sdbus_error.cpp
/openbmc/sdbusplus/test/meson.build
/openbmc/sdbusplus/test/message/append.cpp
/openbmc/sdbusplus/test/message/native_types.cpp
/openbmc/sdbusplus/test/message/read.cpp
/openbmc/sdbusplus/test/message/types.cpp
/openbmc/sdbusplus/test/server/Test.interface.yaml
/openbmc/sdbusplus/test/server/object.cpp
/openbmc/sdbusplus/test/timer.cpp
/openbmc/sdbusplus/test/utility/tuple_to_array.cpp
/openbmc/sdbusplus/test/utility/type_traits.cpp
/openbmc/sdbusplus/test/valgrind.supp
/openbmc/sdbusplus/test/vtable/vtable.cpp
/openbmc/sdbusplus/test/vtable/vtable_c.c
/openbmc/sdbusplus/tools/meson.build
/openbmc/sdbusplus/tools/sdbus++
/openbmc/sdbusplus/tools/sdbus++-gendir
/openbmc/sdbusplus/tools/sdbusplus/__init__.py
/openbmc/sdbusplus/tools/sdbusplus/enum.py
/openbmc/sdbusplus/tools/sdbusplus/error.py
/openbmc/sdbusplus/tools/sdbusplus/interface.py
/openbmc/sdbusplus/tools/sdbusplus/method.py
/openbmc/sdbusplus/tools/sdbusplus/namedelement.py
/openbmc/sdbusplus/tools/sdbusplus/property.py
/openbmc/sdbusplus/tools/sdbusplus/renderer.py
/openbmc/sdbusplus/tools/sdbusplus/signal.py
/openbmc/sdbusplus/tools/sdbusplus/templates/error.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/error.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/error.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.client.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.prototype.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.prototype.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.md.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.prototype.hpp.mako
/openbmc/sdbusplus/tools/setup.py

123