git: bf24d17fda75 - main - Have dumpfs(8) ignore superblock check-hash failures.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 25 Jul 2022 01:12:56 UTC
The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=bf24d17fda75cc89a92248715d52a73f23adc89c commit bf24d17fda75cc89a92248715d52a73f23adc89c Author: Kirk McKusick <mckusick@FreeBSD.org> AuthorDate: 2022-07-25 01:01:43 +0000 Commit: Kirk McKusick <mckusick@FreeBSD.org> CommitDate: 2022-07-25 01:12:24 +0000 Have dumpfs(8) ignore superblock check-hash failures. Set the STDSB_NOHASHFAIL request so that dumpfs(8) can print out filesystem details even when the superblock checksum is incorrect. --- sbin/dumpfs/dumpfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 99b4ad0b9274..7f2acdf435ea 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -130,7 +130,13 @@ main(int argc, char *argv[]) usage(); while ((name = *argv++) != NULL) { - if (ufs_disk_fillout(&disk, name) == -1) { + if (ufs_disk_fillout_blank(&disk, name) == -1) { + ufserr(name); + eval |= 1; + continue; + } + disk.d_sblockloc = STDSB_NOHASHFAIL; + if (sbread(&disk) == -1) { ufserr(name); eval |= 1; continue;