Add rotate support if the space is full
delete the first existing file if the space is not enough
Tested:
1. create dump and make the space is not enough
busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 0
busctl tree xyz.openbmc_project.Dump.Manager `-/xyz
`-/xyz/openbmc_project
`-/xyz/openbmc_project/dump
|-/xyz/openbmc_project/dump/bmc
| `-/xyz/openbmc_project/dump/bmc/entry
| |-/xyz/openbmc_project/dump/bmc/entry/10
| |-/xyz/openbmc_project/dump/bmc/entry/6
| |-/xyz/openbmc_project/dump/bmc/entry/7
| |-/xyz/openbmc_project/dump/bmc/entry/8
| `-/xyz/openbmc_project/dump/bmc/entry/9
`-/xyz/openbmc_project/dump/internal
`-/xyz/openbmc_project/dump/internal/manager
2. create dump again and the the first existing file will be deleted
Signed-off-by: Xie Ning <xiening.xll@bytedance.com>
Change-Id: Ic3b376d7e6512a264f849de760363f4e167421c7
diff --git a/meson.build b/meson.build
index 2b3e7f5..d7b5714 100644
--- a/meson.build
+++ b/meson.build
@@ -122,6 +122,9 @@
conf_data.set_quoted('FAULTLOG_DUMP_PATH', get_option('FAULTLOG_DUMP_PATH'),
description : 'Directory where fault logs are placed'
)
+conf_data.set('BMC_DUMP_ROTATE_CONFIG', get_option('dump_rotate_config').enabled(),
+ description : 'Turn on rotate config for bmc dump'
+ )
configure_file(configuration : conf_data,
output : 'config.h'