Renaming ubifs-workaround flag to jffs-workaround
Changes:
Renaming the ubifs-workaround flag to jffs-workaround.
Default behaviour is IN_CREATE, if jffs-workaround is enabled
will monitor for IN_CLOSE_WRITE.
Test:
Tested the fix on romulus i.e. jffs2, ext4 and ubifs. The core file
is getting transferred to dump folder.
Also did full build for jffs and ext4 fs.
Change-Id: I964f5923ad73926db214526aa6c62fca9ac90ba8
Signed-off-by: Chirag Sharma <chirshar@in.ibm.com>
diff --git a/core_manager.hpp b/core_manager.hpp
index 18b7125..b184dae 100644
--- a/core_manager.hpp
+++ b/core_manager.hpp
@@ -16,14 +16,17 @@
using Watch = phosphor::dump::inotify::Watch;
using UserMap = phosphor::dump::inotify::UserMap;
-/** workaround: Watches for IN_CREATE event for the
- * ubi filesystem based systemd-coredump core path
+/** workaround: Watches for IN_CLOSE_WRITE event for the
+ * jffs filesystem based systemd-coredump core path
* Refer openbmc/issues/#2287 for more details.
+ *
+ * JFFS_CORE_FILE_WORKAROUND will be enabled for jffs and
+ * for other file system it will be disabled.
*/
-#ifdef UBI_CORE_FILE_WORKAROUND
-static constexpr auto coreFileEvent = IN_CREATE;
-#else
+#ifdef JFFS_CORE_FILE_WORKAROUND
static constexpr auto coreFileEvent = IN_CLOSE_WRITE;
+#else
+static constexpr auto coreFileEvent = IN_CREATE;
#endif
/** @class Manager
diff --git a/meson.build b/meson.build
index 66ffdee..a451571 100644
--- a/meson.build
+++ b/meson.build
@@ -76,8 +76,8 @@
conf_data.set('ERROR_MAP_YAML', get_option('ERROR_MAP_YAML'),
description : 'YAML filepath containing error object paths'
)
-conf_data.set('UBI_CORE_FILE_WORKAROUND', get_option('ubifs-workaround').enabled(),
- description : 'Turn on ubi workaround for core file'
+conf_data.set('JFFS_CORE_FILE_WORKAROUND', get_option('jffs-workaround').enabled(),
+ description : 'Turn on jffs workaround for core file'
)
configure_file(configuration : conf_data,
diff --git a/meson_options.txt b/meson_options.txt
index 1f25560..de4a7ee 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,8 +4,8 @@
option('oe-sdk', type: 'feature', description: 'Enable OE SDK')
-option('ubifs-workaround', type: 'feature',
- description : 'Turn on ubi workaround for core file'
+option('jffs-workaround', type: 'feature',
+ description : 'Turn on jffs workaround for core file'
)
option('DUMP_BUSNAME', type : 'string',