Module Name:    src
Committed By:   tkusumi
Date:           Fri Aug 14 18:35:57 UTC 2020

Modified Files:
        src/usr.sbin/fstyp: hammer2.c

Log Message:
fstyp: Fix incorrect pfs_type test for HAMMER2 inode

taken-from: DragonFly BSD


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/fstyp/hammer2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/fstyp/hammer2.c
diff -u src/usr.sbin/fstyp/hammer2.c:1.4 src/usr.sbin/fstyp/hammer2.c:1.5
--- src/usr.sbin/fstyp/hammer2.c:1.4	Wed Jan 15 15:32:05 2020
+++ src/usr.sbin/fstyp/hammer2.c	Fri Aug 14 18:35:57 2020
@@ -1,4 +1,4 @@
-/*        $NetBSD: hammer2.c,v 1.4 2020/01/15 15:32:05 tkusumi Exp $      */
+/*        $NetBSD: hammer2.c,v 1.5 2020/08/14 18:35:57 tkusumi Exp $      */
 
 /*-
  * Copyright (c) 2017-2019 The DragonFly Project
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hammer2.c,v 1.4 2020/01/15 15:32:05 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hammer2.c,v 1.5 2020/08/14 18:35:57 tkusumi Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -122,7 +122,7 @@ find_pfs(FILE *fp, const hammer2_blockre
 	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 {

Reply via email to