1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
#
# The actual call to mklkcd and checkattr
#
mkdir -p out || exit 99
name=$( basename "$0" )
dumpfile="out/${name}.dump"
./mklkcd "$dumpfile" <<EOF
arch_name = $arch
page_shift = $page_shift
page_offset = $page_offset
panic_string = $panic
dump_level = 1
uts.sysname = $sysname
uts.nodename = $node
uts.release = $release
uts.version = $version
uts.machine = $machine
uts.domainname = $domain
NR_CPUS = 8
num_cpus = 1
EOF
rc=$?
if [ $rc -ne 0 ]; then
echo "Cannot create lkcd file" >&2
exit $rc
fi
echo "Created empty LKCD dump: $dumpfile"
./checkattr "$dumpfile" <<EOF
file = directory:
file.set.number = number:1
file.set.0 = directory:
file.set.0.fd = number
file.format = string: lkcd
cache = directory:
cache.size = number
cache.hits = number:0
cache.misses = number:0
arch = directory:
arch.name = string: $arch
arch.byte_order = number: $byte_order
arch.ptr_size = number: $ptr_size
arch.page_shift = number: $page_shift
arch.page_size = number: $page_size
arch.pteval_size = $pteval_spec
linux = directory:
linux.uts = directory:
linux.uts.sysname = string: $sysname
linux.uts.nodename = string: $node
linux.uts.release = string: $release
linux.uts.version = string: $version
linux.uts.machine = string: $machine
linux.uts.domainname = string: $domain
EOF
rc=$?
if [ $rc -ne 0 ]; then
echo "Attribute check failed" >&2
exit $rc
fi
exit 0
|