Index: usr.sbin/fstyp/hammer.c =================================================================== --- usr.sbin/fstyp/hammer.c +++ usr.sbin/fstyp/hammer.c @@ -76,7 +76,7 @@ assert(count != 0); memcpy(&fsid, &ondisk->vol_fsid, sizeof(fsid)); memcpy(&fstype, &ondisk->vol_fstype, sizeof(fstype)); - strncpy(label, ondisk->vol_label, sizeof(label)); + strlcpy(label, ondisk->vol_label, sizeof(label)); } else { if (ondisk->vol_count != count) return (5); @@ -84,7 +84,7 @@ return (6); if (memcmp(&ondisk->vol_fstype, &fstype, sizeof(fstype))) return (7); - if (strncmp(ondisk->vol_label, label, sizeof(label))) + if (strcmp(ondisk->vol_label, label)) return (8); } Index: usr.sbin/fstyp/hammer2.c =================================================================== --- usr.sbin/fstyp/hammer2.c +++ usr.sbin/fstyp/hammer2.c @@ -87,11 +87,6 @@ best = broot; } } - if (best_i == -1) { - warnx("Failed to find volume header from zones"); - error = 1; - goto done; - } bref = &vols[best_i]->voldata.sroot_blockset.blockref[0]; if (bref->type != HAMMER2_BREF_TYPE_INODE) {