The FreeBSD fstyp supports HAMMER1/2 based on somewhat old DragonFly source. Below diff is to make them uptodate with the current DragonFly's fstyp HAMMER1/2 code base without making changes to other fstyp files (note that DragonFly does this in their fstyp). This makes easier to sync up with DragonFly's HAMMER1/2 detection support in the future. Git format diff https://www.dragonflybsd.org/~tkusumi/diff/freebsd/0001-fstyp-Sync-HAMMER1-2-support-with-DragonFly.patch
Looks good to me, thank you! FWIW, I am considering dropping the headers and using only the required structures directly.
A commit references this bug: Author: pfg Date: Thu Feb 6 18:04:16 UTC 2020 New revision: 357631 URL: https://svnweb.freebsd.org/changeset/base/357631 Log: fstyp: sync HAMMER1/2 detection support with DragonFly BSD. Submitted by: Tomohiro Kusumi PR: 243929 Changes: head/usr.sbin/fstyp/hammer.c head/usr.sbin/fstyp/hammer2.c
Thanks!