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: Ice2f46e61b4a7604230d495463c5c90fdc549505
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
diff --git a/extensions/phal/dump_utils.cpp b/extensions/phal/dump_utils.cpp
index 2d0e703..dff3470 100644
--- a/extensions/phal/dump_utils.cpp
+++ b/extensions/phal/dump_utils.cpp
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "dump_utils.hpp"
 
 #include "util.hpp"
@@ -104,7 +106,7 @@
                                  dumpParameters.logId, dumpParameters.unitId)
                          .c_str());
 
-    constexpr auto path = "/org/openpower/dump";
+    constexpr auto path = OP_DUMP_OBJ_PATH;
     constexpr auto interface = "xyz.openbmc_project.Dump.Create";
     constexpr auto function = "CreateDump";
 
diff --git a/meson.build b/meson.build
index 7ac7cf2..be48e54 100644
--- a/meson.build
+++ b/meson.build
@@ -54,6 +54,10 @@
                       description : 'Path to the phal devtree reinit attribute list file'
                     )
 
+conf_data.set_quoted('OP_DUMP_OBJ_PATH', get_option('op_dump_obj_path'),
+                      description : 'Object path requesting OpenPOWER dumps'
+                    )
+
 configure_file(configuration : conf_data,
                output : 'config.h'
               )
diff --git a/meson.options b/meson.options
index b5117f2..e50144f 100644
--- a/meson.options
+++ b/meson.options
@@ -28,3 +28,7 @@
         description : 'Path to the phal devtree reinit attribute list file'
 )
 
+option('op_dump_obj_path', type: 'string',
+        value: '/org/openpower/dump',
+        description : 'Object path requesting OpenPOWER dumps')
+