opfunctions: Fix dumpId length
Dump Id in BMC Dump Filename is padded to 7 digits instead of 8 digits.
This is causing file name mismatch between the dump offloaded to
HMC/OS and the dump stored on BMC. Fixing this issue by padding Dump
Id to 8 digits.
Test Results:
Before:
root@p10bmc:/var/lib/phosphor-debug-collector/dumps/6# ls
BMCDUMP.13ECF8X.0000006.20241001051003
After:
root@p10bmc:/var/lib/phosphor-debug-collector/dumps/17# ls
BMCDUMP.1012345.00000017.20330125023119
Change-Id: I04c469ad3aaf6480c5732445ba7f8e644357262e
Signed-off-by: SwethaParasa <parasa.swetha1@ibm.com>
diff --git a/dump/tools/common/include/opfunctions b/dump/tools/common/include/opfunctions
index 0808597..444fe7c 100644
--- a/dump/tools/common/include/opfunctions
+++ b/dump/tools/common/include/opfunctions
@@ -16,7 +16,7 @@
# @param BMC Dump File Name
function get_bmc_dump_filename() {
fetch_serial_number
- dump_id=$(printf %07d $dump_id)
+ dump_id=$(printf %08d $dump_id)
if [ $dump_type = "$TYPE_FAULTDATA" ]; then
header_dump_name="FLTDUMP"
name="NAGDUMP.${serialNo}.${dump_id}.${dDay}"