diff options
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | control/manager.cpp | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f57bb02..8ffda9b 100644 --- a/configure.ac +++ b/configure.ac @@ -96,6 +96,19 @@ AS_IF([test "x$enable_presence" != "xno"], [ ]) AS_IF([test "x$enable_control" != "xno"], [ + # Add fan control Dbus attributes + AC_ARG_VAR(CONTROL_BUSNAME, [The fan control busname to own]) + AS_IF([test "x$CONTROL_BUSNAME" == "x"], + [CONTROL_BUSNAME="xyz.openbmc_project.Control.Thermal"]) + AC_DEFINE_UNQUOTED([CONTROL_BUSNAME], ["$CONTROL_BUSNAME"], + [The fan control busname to own]) + + AC_ARG_VAR(CONTROL_OBJPATH, [The fan control root object path]) + AS_IF([test "x$CONTROL_OBJPATH" == "x"], + [CONTROL_OBJPATH="/xyz/openbmc_project/control/thermal"]) + AC_DEFINE_UNQUOTED([CONTROL_OBJPATH], ["$CONTROL_OBJPATH"], + [The fan control root object path]) + # Add optional yaml file arguments AC_ARG_VAR(FAN_DEF_YAML_FILE, [The fan definition file to use]) diff --git a/control/manager.cpp b/control/manager.cpp index 6994f91..c99f4a3 100644 --- a/control/manager.cpp +++ b/control/manager.cpp @@ -19,6 +19,7 @@ #include <phosphor-logging/elog-errors.hpp> #include <xyz/openbmc_project/Common/error.hpp> #include <unistd.h> +#include "config.h" #include "manager.hpp" #include "utility.hpp" #include "sdbusplus.hpp" @@ -106,6 +107,7 @@ Manager::Manager(sdbusplus::bus::bus& bus, } } + bus.request_name(CONTROL_BUSNAME); } |