summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJayanth Othayoth <ojayanth@in.ibm.com>2017-08-02 06:24:58 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-08-22 20:48:18 +0000
commitab7f920942ff0b6337b641b6f80ad6025e120220 (patch)
tree19cbfdcbbbb1a95f457c3af1be3dd110fa333cc2 /configure.ac
parent56a0bc8af04d120502710643b4a9cfa52054e6f6 (diff)
downloadphosphor-debug-collector-ab7f920942ff0b6337b641b6f80ad6025e120220.tar.gz
phosphor-debug-collector-ab7f920942ff0b6337b641b6f80ad6025e120220.zip
Cap the number of dumps
Calculate number of dumps allowed in a system based on individual dump Max size configured in the system. Algorithm: Setting Dump size to maximum size, if (dump entries + active dumps) is less than total allowed dump entries. Otherwise return error. Next patch will provide additional algorithm to cap the dump based on actual size of the dump files. Change-Id: Id8916a31d72f5c2f2f23eaf68062b829b7e4100c Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7d93605..3a042cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,5 +63,13 @@ AC_ARG_VAR(BMC_DUMP_PATH, [Directory where bmc dumps are placed])
AS_IF([test "x$BMC_DUMP_PATH" == "x"], [BMC_DUMP_PATH="/tmp/dumps"])
AC_DEFINE_UNQUOTED([BMC_DUMP_PATH], ["$BMC_DUMP_PATH"], [Directory where bmc dumps are placed])
+AC_ARG_VAR(BMC_DUMP_MAX_SIZE, [Maximum size of one bmc dump in kilo bytes])
+AS_IF([test x$BMC_DUMP_MAX_SIZE == x], [BMC_DUMP_MAX_SIZE=200])
+AC_DEFINE_UNQUOTED([BMC_DUMP_MAX_SIZE], [$BMC_DUMP_MAX_SIZE], [Maximum size of one bmc dump in kilo bytes])
+
+AC_ARG_VAR(BMC_DUMP_TOTAL_SIZE, [Total size of the bmc dump in kilo bytes])
+AS_IF([test x$BMC_DUMP_TOTAL_SIZE == x], [BMC_DUMP_TOTAL_SIZE=1024])
+AC_DEFINE_UNQUOTED([BMC_DUMP_TOTAL_SIZE], [$BMC_DUMP_TOTAL_SIZE], [Total size of the dump in kilo bytes])
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
OpenPOWER on IntegriCloud