#!/bin/sh
set -e

. /usr/share/os-prober/common.sh

partition="$1"
dir="$2"
type="$3"

if [ "$type" = befs ] && [ -f "$dir/beos/system/zbeos" ]; then
	# XXX will chain loading work?
	# the partition must have been makebootable'd
        label="$(count_next_label BeOS)"
	result "$partition:BeOS:$label:chain"
	exit 0
else
	exit 1
fi
