faultlog: Initial framework for Fault Log
Fault Log is a new type of dump. For details please see
https://github.com/openbmc/docs/blob/master/designs/hw-fault-monitor.md
This commit enables creation and deletion of fault log entries.
Tested: Created and deleted fault log entries by calling the
corresponding D-Bus methods via bmcweb (added extra code in bmcweb for
testing this). Also forced a fault log directory creation error by
changing the code to specify a nonexistent directory path "/abc/def/"
instead of FAULTLOG_DUMP_PATH, and forced a fault log file open error
by creating a directory (manually using mkdir) with the same name as
the file that the fault log manager tried to open.
Signed-off-by: Claire Weinan <cweinan@google.com>
Change-Id: I03d4c19a4c131f7224ac895e404c46b1f566617b
diff --git a/meson.build b/meson.build
index 0825c96..2b3e7f5 100644
--- a/meson.build
+++ b/meson.build
@@ -113,6 +113,15 @@
conf_data.set('JFFS_CORE_FILE_WORKAROUND', get_option('jffs-workaround').enabled(),
description : 'Turn on jffs workaround for core file'
)
+conf_data.set_quoted('FAULTLOG_DUMP_OBJ_ENTRY', get_option('FAULTLOG_DUMP_OBJ_ENTRY'),
+ description : 'The Fault Log dump entry DBus object path'
+ )
+conf_data.set_quoted('FAULTLOG_DUMP_OBJPATH', get_option('FAULTLOG_DUMP_OBJPATH'),
+ description : 'The Fault Log Dump manager Dbus path'
+ )
+conf_data.set_quoted('FAULTLOG_DUMP_PATH', get_option('FAULTLOG_DUMP_PATH'),
+ description : 'Directory where fault logs are placed'
+ )
configure_file(configuration : conf_data,
output : 'config.h'
@@ -152,7 +161,9 @@
'watch.cpp',
'bmc_dump_entry.cpp',
'dump_utils.cpp',
- 'dump_offload.cpp'
+ 'dump_offload.cpp',
+ 'dump_manager_faultlog.cpp',
+ 'faultlog_dump_entry.cpp',
]
phosphor_dump_manager_dependency = [