pldmd: code re-org
Move code specific to the pldm main app to its own directory.
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I9341ebb02b7fcf8f62fbbe922e1fa6fe3fbcb9ec
diff --git a/host-bmc/dbus_to_host_effecters.hpp b/host-bmc/dbus_to_host_effecters.hpp
index 7c37c88..7720edd 100644
--- a/host-bmc/dbus_to_host_effecters.hpp
+++ b/host-bmc/dbus_to_host_effecters.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "dbus_impl_requester.hpp"
+#include "pldmd/dbus_impl_requester.hpp"
#include "types.hpp"
#include "utils.hpp"
diff --git a/host-bmc/host_pdr_handler.hpp b/host-bmc/host_pdr_handler.hpp
index 5bfba72..06b46e6 100644
--- a/host-bmc/host_pdr_handler.hpp
+++ b/host-bmc/host_pdr_handler.hpp
@@ -3,8 +3,8 @@
#include "libpldm/base.h"
#include "libpldm/platform.h"
-#include "dbus_impl_requester.hpp"
#include "libpldmresponder/pdr_utils.hpp"
+#include "pldmd/dbus_impl_requester.hpp"
#include "types.hpp"
#include "utils.hpp"
diff --git a/libpldmresponder/base.hpp b/libpldmresponder/base.hpp
index 67cf9d9..6e5b653 100644
--- a/libpldmresponder/base.hpp
+++ b/libpldmresponder/base.hpp
@@ -2,7 +2,7 @@
#include "libpldm/base.h"
-#include "handler.hpp"
+#include "pldmd/handler.hpp"
#include <stdint.h>
diff --git a/libpldmresponder/bios.hpp b/libpldmresponder/bios.hpp
index 269d5a1..f3cf5f9 100644
--- a/libpldmresponder/bios.hpp
+++ b/libpldmresponder/bios.hpp
@@ -7,7 +7,7 @@
#include "bios_config.hpp"
#include "bios_table.hpp"
-#include "handler.hpp"
+#include "pldmd/handler.hpp"
#include <stdint.h>
diff --git a/libpldmresponder/fru.hpp b/libpldmresponder/fru.hpp
index afa6b1c..e23cd48 100644
--- a/libpldmresponder/fru.hpp
+++ b/libpldmresponder/fru.hpp
@@ -6,7 +6,7 @@
#include "libpldm/pdr.h"
#include "fru_parser.hpp"
-#include "handler.hpp"
+#include "pldmd/handler.hpp"
#include <sdbusplus/message.hpp>
diff --git a/libpldmresponder/platform.hpp b/libpldmresponder/platform.hpp
index ccd3ddf..a52c9a8 100644
--- a/libpldmresponder/platform.hpp
+++ b/libpldmresponder/platform.hpp
@@ -6,10 +6,10 @@
#include "libpldm/states.h"
#include "event_parser.hpp"
-#include "handler.hpp"
#include "host-bmc/host_pdr_handler.hpp"
#include "libpldmresponder/pdr.hpp"
#include "libpldmresponder/pdr_utils.hpp"
+#include "pldmd/handler.hpp"
#include "utils.hpp"
#include <stdint.h>
diff --git a/libpldmresponder/platform_numeric_effecter.hpp b/libpldmresponder/platform_numeric_effecter.hpp
index 76c2267..9d435b1 100644
--- a/libpldmresponder/platform_numeric_effecter.hpp
+++ b/libpldmresponder/platform_numeric_effecter.hpp
@@ -5,9 +5,9 @@
#include "libpldm/platform.h"
#include "libpldm/states.h"
-#include "handler.hpp"
#include "libpldmresponder/pdr.hpp"
#include "pdr_utils.hpp"
+#include "pldmd/handler.hpp"
#include "utils.hpp"
#include <math.h>
diff --git a/libpldmresponder/platform_state_effecter.hpp b/libpldmresponder/platform_state_effecter.hpp
index 1f665be..961aa7f 100644
--- a/libpldmresponder/platform_state_effecter.hpp
+++ b/libpldmresponder/platform_state_effecter.hpp
@@ -5,9 +5,9 @@
#include "libpldm/platform.h"
#include "libpldm/states.h"
-#include "handler.hpp"
#include "libpldmresponder/pdr.hpp"
#include "pdr_utils.hpp"
+#include "pldmd/handler.hpp"
#include "utils.hpp"
#include <cstdint>
diff --git a/meson.build b/meson.build
index b3f39fe..83b4c22 100644
--- a/meson.build
+++ b/meson.build
@@ -67,10 +67,10 @@
executable(
'pldmd',
- 'pldmd.cpp',
- 'dbus_impl_requester.cpp',
- 'instance_id.cpp',
- 'dbus_impl_pdr.cpp',
+ 'pldmd/pldmd.cpp',
+ 'pldmd/dbus_impl_requester.cpp',
+ 'pldmd/instance_id.cpp',
+ 'pldmd/dbus_impl_pdr.cpp',
'host-bmc/dbus_to_host_effecters.cpp',
implicit_include_directories: false,
dependencies: deps,
@@ -83,7 +83,7 @@
define_variable: ['prefix', get_option('prefix')])
configure_file(
copy: true,
- input: 'pldmd.service',
+ input: 'pldmd/pldmd.service',
install: true,
install_dir: systemd_system_unit_dir,
output: 'pldmd.service',
diff --git a/oem/ibm/libpldmresponder/file_io.hpp b/oem/ibm/libpldmresponder/file_io.hpp
index 60fa9a1..e1f26cb 100644
--- a/oem/ibm/libpldmresponder/file_io.hpp
+++ b/oem/ibm/libpldmresponder/file_io.hpp
@@ -6,7 +6,7 @@
#include "oem/ibm/libpldm/file_io.h"
#include "oem/ibm/libpldm/host.h"
-#include "handler.hpp"
+#include "pldmd/handler.hpp"
#include "utils.hpp"
#include <fcntl.h>
diff --git a/dbus_impl_pdr.cpp b/pldmd/dbus_impl_pdr.cpp
similarity index 100%
rename from dbus_impl_pdr.cpp
rename to pldmd/dbus_impl_pdr.cpp
diff --git a/dbus_impl_pdr.hpp b/pldmd/dbus_impl_pdr.hpp
similarity index 100%
rename from dbus_impl_pdr.hpp
rename to pldmd/dbus_impl_pdr.hpp
diff --git a/dbus_impl_requester.cpp b/pldmd/dbus_impl_requester.cpp
similarity index 100%
rename from dbus_impl_requester.cpp
rename to pldmd/dbus_impl_requester.cpp
diff --git a/dbus_impl_requester.hpp b/pldmd/dbus_impl_requester.hpp
similarity index 100%
rename from dbus_impl_requester.hpp
rename to pldmd/dbus_impl_requester.hpp
diff --git a/handler.hpp b/pldmd/handler.hpp
similarity index 100%
rename from handler.hpp
rename to pldmd/handler.hpp
diff --git a/instance_id.cpp b/pldmd/instance_id.cpp
similarity index 100%
rename from instance_id.cpp
rename to pldmd/instance_id.cpp
diff --git a/instance_id.hpp b/pldmd/instance_id.hpp
similarity index 100%
rename from instance_id.hpp
rename to pldmd/instance_id.hpp
diff --git a/invoker.hpp b/pldmd/invoker.hpp
similarity index 100%
rename from invoker.hpp
rename to pldmd/invoker.hpp
diff --git a/pldmd.cpp b/pldmd/pldmd.cpp
similarity index 100%
rename from pldmd.cpp
rename to pldmd/pldmd.cpp
diff --git a/pldmd.service b/pldmd/pldmd.service
similarity index 100%
rename from pldmd.service
rename to pldmd/pldmd.service
diff --git a/test/meson.build b/test/meson.build
index 3f30a60..52a431e 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -16,8 +16,8 @@
gmock = dependency('gmock', disabler: true, required: true)
pldmd = declare_dependency(
sources: [
- '../instance_id.cpp',
- '../dbus_impl_requester.cpp',
+ '../pldmd/instance_id.cpp',
+ '../pldmd/dbus_impl_requester.cpp',
'../host-bmc/host_pdr_handler.cpp',
'../host-bmc/dbus_to_host_effecters.cpp'])
diff --git a/test/pldmd_instanceid_test.cpp b/test/pldmd_instanceid_test.cpp
index 35ff146..4a1f9f6 100644
--- a/test/pldmd_instanceid_test.cpp
+++ b/test/pldmd_instanceid_test.cpp
@@ -1,4 +1,4 @@
-#include "instance_id.hpp"
+#include "pldmd/instance_id.hpp"
#include <stdexcept>
diff --git a/test/pldmd_registration_test.cpp b/test/pldmd_registration_test.cpp
index 37339c3..af709e3 100644
--- a/test/pldmd_registration_test.cpp
+++ b/test/pldmd_registration_test.cpp
@@ -1,6 +1,6 @@
#include "libpldm/base.h"
-#include "invoker.hpp"
+#include "pldmd/invoker.hpp"
#include <stdexcept>