Author: pfg
Date: Thu Aug 20 05:18:08 2020
New Revision: 364417
URL: https://svnweb.freebsd.org/changeset/base/364417

Log:
  usr.sbin/fstyp: Fix incorrect pfs_type test in ondisk inode
  
  "ipdata.meta.pfs_type & HAMMER2_PFSTYPE_SUPROOT" happened to have
  the same result (except HAMMER2_PFSTYPE_DUMMY could also match).
  
  Obtained from: Dragonfly (git 29e6489bbd4f8e237c9c17b300ac8b711f36770)

Modified:
  head/usr.sbin/fstyp/hammer2.c

Modified: head/usr.sbin/fstyp/hammer2.c
==============================================================================
--- head/usr.sbin/fstyp/hammer2.c       Thu Aug 20 05:08:49 2020        
(r364416)
+++ head/usr.sbin/fstyp/hammer2.c       Thu Aug 20 05:18:08 2020        
(r364417)
@@ -127,7 +127,7 @@ find_pfs(FILE *fp, const hammer2_blockref_t *bref, con
        switch (bref->type) {
        case HAMMER2_BREF_TYPE_INODE:
                ipdata = media->ipdata;
-               if (ipdata.meta.pfs_type & HAMMER2_PFSTYPE_SUPROOT) {
+               if (ipdata.meta.pfs_type == HAMMER2_PFSTYPE_SUPROOT) {
                        bscan = &ipdata.u.blockset.blockref[0];
                        bcount = HAMMER2_SET_COUNT;
                } else {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to