diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | control/Makefile.am | 11 | ||||
-rw-r--r-- | control/main.cpp | 29 |
5 files changed, 44 insertions, 1 deletions
@@ -19,3 +19,4 @@ stamp-h1 *.o
fan_detect_defs.cpp
phosphor-fan-presence-tach
+phosphor-fan-control
diff --git a/Makefile.am b/Makefile.am index 30223d0..6180d1e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,3 +21,5 @@ CLEANFILES = fan_detect_defs.cpp fan_detect_defs.cpp: ${srcdir}/gen-fan-detect-defs.py $(AM_V_GEN)$(GEN_FAN_DETECT_DEFS) > $@ + +SUBDIRS = control
\ No newline at end of file diff --git a/configure.ac b/configure.ac index d5659f3..2c083ca 100644 --- a/configure.ac +++ b/configure.ac @@ -42,5 +42,5 @@ AC_DEFINE_UNQUOTED([FAN_DETECT_YAML_FILE], ["$FAN_DETECT_YAML_FILE"], # Create configured output AC_SUBST([GEN_FAN_DETECT_DEFS], [$PYTHON ${srcdir}/gen-fan-detect-defs.py -y $FAN_DETECT_YAML_FILE]) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile control/Makefile]) AC_OUTPUT diff --git a/control/Makefile.am b/control/Makefile.am new file mode 100644 index 0000000..a9b8133 --- /dev/null +++ b/control/Makefile.am @@ -0,0 +1,11 @@ +AM_DEFAULT_SOURCE_EXT = .cpp +AM_CPPFLAGS = -I${top_src_dir} + +sbin_PROGRAMS = \ + phosphor-fan-control + +phosphor_fan_control_SOURCES = \ + main.cpp + +phosphor_fan_control_LDFLAGS = $(SDBUSPLUS_LIBS) $(PHOSPHOR_LOGGING_LIBS) +phosphor_fan_control_CXXFLAGS = $(SDBUSPLUS_CFLAGS) $(PHOSPHOR_LOGGING_CFLAGS) diff --git a/control/main.cpp b/control/main.cpp new file mode 100644 index 0000000..e332dda --- /dev/null +++ b/control/main.cpp @@ -0,0 +1,29 @@ +/** + * Copyright © 2017 IBM Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include <sdbusplus/bus.hpp> + +int main(int argc, char* argv[]) +{ + auto bus = sdbusplus::bus::new_default(); + + while (true) + { + bus.process_discard(); + bus.wait(); + } + + return 0; +} |