Option to override dump request D-Bus path

Added option for overriding the object path for requesting OpenPOWER
dumps. On recent systems the object path is changed so adding option
to override the path in the recipe.

Change-Id: I1b1691c713be094c7286324e6653836aced11f45
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
diff --git a/meson.build b/meson.build
index dc57e53..777f4d7 100644
--- a/meson.build
+++ b/meson.build
@@ -22,6 +22,7 @@
 conf_data.set_quoted('OCC_DEV_PATH', '/dev/occ')
 conf_data.set_quoted('CPU_SUBPATH', '/xyz/openbmc_project/inventory/system/chassis/motherboard')
 conf_data.set_quoted('OCC_CONTROL_PERSIST_PATH', '/var/lib/openpower-occ-control')
+conf_data.set_quoted('OP_DUMP_OBJ_PATH', get_option('op_dump_obj_path'))
 
 conf_data.set('MAX_CPUS', get_option('max-cpus'))
 conf_data.set('OCC_CPU_TEMP_SENSOR_TYPE', 0xC0)
diff --git a/meson.options b/meson.options
index c420a7d..c187f79 100644
--- a/meson.options
+++ b/meson.options
@@ -52,3 +52,10 @@
     type : 'string',
     description : 'The path to the yaml config files'
 )
+
+option(
+    'op_dump_obj_path',
+    type: 'string',
+    value: '/org/openpower/dump',
+    description : 'Object path requesting OpenPOWER dumps'
+)
diff --git a/occ_manager.cpp b/occ_manager.cpp
index 5007682..63d5f2e 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -638,13 +638,13 @@
 
         try
         {
-            constexpr auto path = "/org/openpower/dump";
             constexpr auto interface = "xyz.openbmc_project.Dump.Create";
             constexpr auto function = "CreateDump";
 
-            std::string service = utils::getService(path, interface);
-            auto method = bus.new_method_call(service.c_str(), path, interface,
-                                              function);
+            std::string service = utils::getService(OP_DUMP_OBJ_PATH,
+                                                    interface);
+            auto method = bus.new_method_call(service.c_str(), OP_DUMP_OBJ_PATH,
+                                              interface, function);
 
             std::map<std::string, std::variant<std::string, uint64_t>>
                 createParams{