xref: /openbmc/openbmc-tools/pldm/pdrdump.sh (revision 47007c29)
1#!/bin/sh
2pdrdump_file=$1
3printf "Dumping PDRs to $pdrdump_file ..."
4i=0
5done=0
6while [ $done -eq 0 ]
7do
8    echo "pldmtool platform GetPDR -d $i" >> $pdrdump_file
9    pldmtool platform GetPDR -d $i >> $pdrdump_file
10    i=`grep nextRecordHandle $pdrdump_file | tail -n1 | awk '{print $2}'`
11    i=${i::-1}
12    if [ $i -eq 0 ]; then done=1; fi
13done
14printf " Complete!\n"