⬢ DragonFlyBSD Kernel Audit
DF-2537 / gen.sh
← back to finding ↓ download raw
#!/bin/sh
# gen.sh -- extract the ABTS branch of mpt_fc_els_reply_handler VERBATIM
set -e
cd "$(dirname "$0")"
SRC=/usr/src/sys/dev/disk/mpt/mpt_cam.c
sha256 "$SRC"
{
  echo '/* VERBATIM mpt_cam.c:2995-3032 (ABTS branch through the mismatch print) */'
  sed -n '2995,3032p' "$SRC"
} > dfv2537_extract.h
wc -l dfv2537_extract.h
grep -c "rx_id >= mpt->mpt_max_tgtcmds" dfv2537_extract.h
grep -c "tgt_cmd_ptrs\[rx_id\]" dfv2537_extract.h