Skip to content

Commit 4978f0a

Browse files
authored
Merge pull request #71 from gcpin/1110
gendumpheader: Include both originator details or none in dump header
2 parents feb9a2c + 68a3339 commit 4978f0a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

dump/tools/common/include/gendumpheader

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,18 @@ function add_null() {
5252

5353
# Function to add Originator details to dump header
5454
function add_originator_details() {
55-
if [ -z "$ORIGINATOR_TYPE" ]; then
56-
add_null 4
55+
if [ -z "$ORIGINATOR_TYPE" ] || [ -z "$ORIGINATOR_ID" ] ; then
56+
add_null 36
5757
return
5858
fi
59+
5960
len=${#ORIGINATOR_TYPE}
6061
nulltoadd=$(( SIZE_4 - len ))
6162
printf '%s' "$ORIGINATOR_TYPE" >> "$FILE"
6263
if [ "$nulltoadd" -gt 0 ]; then
6364
add_null "$nulltoadd"
6465
fi
6566

66-
if [ -z "$ORIGINATOR_ID" ]; then
67-
add_null 32
68-
return
69-
fi
7067
len=${#ORIGINATOR_ID}
7168
nulltoadd=$(( SIZE_32 - len ))
7269
printf '%s' "$ORIGINATOR_ID" >> "$FILE"
@@ -573,4 +570,4 @@ function gen_header_package() {
573570
get_bmc_model_serial_number
574571

575572
#Run gen_header_package
576-
gen_header_package
573+
gen_header_package

0 commit comments

Comments
 (0)