#
3d68ed5f |
| 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-redundant-string-cstr check
This check finds unnecessary calls to std::string::c_str() and std::string::data().
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Cha
clang-tidy: Enable readability-redundant-string-cstr check
This check finds unnecessary calls to std::string::c_str() and std::string::data().
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I4ff9cd7f1595a1cd7c6dbab4c7a80d6f7cf05ca2
show more ...
|
#
f0592559 |
| 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made static because the functions don’t use this. This check also triggers
clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made static because the functions don’t use this. This check also triggers readability-static-accessed-through -instance check as we are trying to access a static member function through an instance.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I6efe76666f75fb4f65621796466d9347cea25d01
show more ...
|
#
405ea286 |
| 22-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Enable readability-const-return-type check
Checks for functions with a const-qualified return type and recommends removal of the const keyword. Such use of const is usually superfluous,
clang-tidy: Enable readability-const-return-type check
Checks for functions with a const-qualified return type and recommends removal of the const keyword. Such use of const is usually superfluous, and can prevent valuable compiler optimizations. Does not (yet) fix trailing return types.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ifff7541c95d7881d8c6407b20c906ec7eb13abf1
show more ...
|
#
543ac9f1 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I47f3c815913ae34be19ce0d823fa233ed698d1a0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
1f0b715a |
| 17-Jul-2023 |
George Liu <liuxiwei@inspur.com> |
Use the lower camel case of the C++ standard
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ied901f0cc7cc6606e199dad0e31a35f838c32ab9
|
#
65bf3d94 |
| 07-Jun-2022 |
George Liu <liuxiwei@inspur.com> |
Update clang-format
remove empty lines
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ie3e6f356828987a4be5013def90d96b644502821
|
#
f2044037 |
| 17-Mar-2022 |
Patrick Williams <patrick@stwcx.xyz> |
switch map to unordered_map
Generally, unordered_maps should be preferred over map because they have faster access times (O(1)) and tend to allocate less dynamic memory. We do not rely on ordered i
switch map to unordered_map
Generally, unordered_maps should be preferred over map because they have faster access times (O(1)) and tend to allocate less dynamic memory. We do not rely on ordered iteration in any current use of maps, so it is safe to do a full replace.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ieaa28ac7f70f9913d13d25142fea9861d49bb23f
show more ...
|
#
e9fb5c6a |
| 01-Jul-2021 |
George Liu <liuxiwei@inspur.com> |
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Tested: buil
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Tested: built ledManager successfully and Unit Test passes.
Before: The file does not exist or is empty After: The file does not exist or is empty, FILE_PATH = /usr/share/phosphor-led-manager/lamp-test-led-overrides.json
MESSAGE=File does not exist, FILE_PATH = /var/lib/phosphor-led-manager/savedGroups LOG2_FMTMSG=File does not exist, FILE_PATH = {PATH} CODE_FILE=../../../../../../fp5280g2-workspace/sources/phosphor-led-manager/serialize.cpp CODE_LINE=63 CODE_FUNC=void phosphor::led::Serialize::restoreGroups() PATH=/var/lib/phosphor-led-manager/savedGroups SYSLOG_IDENTIFIER=phosphor-ledmanager _PID=298 _COMM=phosphor-ledman _EXE=/usr/bin/phosphor-ledmanager _CMDLINE=phosphor-ledmanager _SYSTEMD_CGROUP=/system.slice/xyz.openbmc_project.LED.GroupManager.service _SYSTEMD_UNIT=xyz.openbmc_project.LED.GroupManager.service _SYSTEMD_INVOCATION_ID=5ddd4960a3b04fe29c34e4ce03b6be06
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I5ec8530e0b539bcf8d7d211c802430698aebd343
show more ...
|
#
d78de14d |
| 23-Aug-2021 |
George Liu <liuxiwei@inspur.com> |
Handle D-Bus exceptions
Remove the usage of is_method_error()[1].
Also, add try-catch to handle D-Bus exceptions around mapper call.
[1]https://github.com/openbmc/sdbusplus/blob/master/include/sdb
Handle D-Bus exceptions
Remove the usage of is_method_error()[1].
Also, add try-catch to handle D-Bus exceptions around mapper call.
[1]https://github.com/openbmc/sdbusplus/blob/master/include/sdbusplus/bus.hpp#L282-L286
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Id2b5234009e62e6c003f24a25c726317646b582b
show more ...
|
#
b6151623 |
| 23-Nov-2020 |
George Liu <liuxiwei@inspur.com> |
Add the restoreLedsAssert method for LED manager
- Logically, Since the physical LEDs states should not be operated during the lamp test, all the physical LEDs states before and during the lamp
Add the restoreLedsAssert method for LED manager
- Logically, Since the physical LEDs states should not be operated during the lamp test, all the physical LEDs states before and during the lamp test should be saved and restored after the lamp test.
Tested: - Store the state of all the physical LEDs before the lamp test, and keep the state of all the physical LEDs consistent after the lamp test.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I8b321bae2e38001ea33a80bda8badcf4c8a55040
show more ...
|
#
87fd11c9 |
| 23-Nov-2020 |
George Liu <liuxiwei@inspur.com> |
Update physical LEDs as part of Lamp test
- Add the getSubTreePaths method for utils and update all physical LEDs.
- Uses GetSubTreePath on Physical LED paths and interfaces and updates all the
Update physical LEDs as part of Lamp test
- Add the getSubTreePaths method for utils and update all physical LEDs.
- Uses GetSubTreePath on Physical LED paths and interfaces and updates all the LEDs to ON as part of start or restart of the test.
- When the lamp test is stopped or the timer expires, all the LEDs are turned OFF.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I27727db62fe963a1a7c8b391d73801bcaf9efeec
show more ...
|
#
616a0716 |
| 17-Feb-2021 |
George Liu <liuxiwei@inspur.com> |
led-use-json: Use specific config files
- When enabled `led-use-json`, it should use the JsonConfig class to find the JSON file name, and do not start until JSON config is found.
- If it has to
led-use-json: Use specific config files
- When enabled `led-use-json`, it should use the JsonConfig class to find the JSON file name, and do not start until JSON config is found.
- If it has to wait for the IBMCompatible interface to show up on D-bus first, it will wait for that.
Tested: - If there is a `/etc/phosphor-led-manager/led-group-config.json` path, congfile=/etc/phosphor-led-manager/led-group-config.json - If there is a `/usr/share/phosphor-led-manager/led-group-config.json` path and there is not `/etc/phosphor-led-manager/`, congfile=/usr/share/phosphor-led-manager/led-group-config.json - If the above two paths do not exist, get the `Name` property of the `xyz.openbmc_project.Configuration.IBMCompatibleSystem` interface, congfile=/usr/share/phosphor-led-manager/${Name}/led-group-config.json
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I1528a3d3711ef6b604868387ad42cb3c0afde119
show more ...
|
#
4c5f5337 |
| 10-Oct-2020 |
George Liu <liuxiwei@inspur.com> |
Add the method to set Functional property based on Group state
When a particular LED Group asserted property is set to true, then the functional state of that FRU is false and vice-versa. This commi
Add the method to set Functional property based on Group state
When a particular LED Group asserted property is set to true, then the functional state of that FRU is false and vice-versa. This commit adds that behavior. Functional status is defined in xyz.openbmc_project.State.Decorator.OperationalStatus interface.
Tested: When manually set the Asserted property to true by the D-Bus, we can see that the Functional is updated to false.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I6fa7a4c41363263d345b6b5335056fad15efb78c
show more ...
|
#
1c737afc |
| 15-Oct-2020 |
George Liu <liuxiwei@inspur.com> |
Add utility for D-Bus
Putting all D-Bus related operation to the utils file.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I934e519bca43b73da01ed09fc73f6c7cdc795e1f
|