This is a FreeBSD version of fstyp program developed by Martin K. Petersen.
fstyp can be used to heuristically detect which file system type a device or a partition contains. Useful for backup scripts.