#!/bin/sh
if [ ! -f tools/system -o ! -f boot/setup -o ! -f boot/bootsect ]; then
    echo "Need tools/system, boot/setup and boot/bootsect"
    exit 1
fi
if ((dd if=tools/system bs=512 conv=sync; \
  (dd of=/dev/null bs=32 count=1; dd bs=512 conv=sync) < boot/setup; \
  (dd of=/dev/null bs=32 count=1; dd bs=512 conv=sync) < boot/bootsect) \
  2>&1 >${1:-/linux}) | grep -v ' records \(in\|out\)'; then
    exit 1
fi
