aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsdb
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2020-09-19 20:06:12 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2020-09-19 20:06:12 +0000
commit68d7185b6495e194e399289edc479ab85e5e4f3f (patch)
treed2d2df74ade978b59945997d2866d42852e22183 /sbin/fsdb
parent9ad1d357e0db6175124257156f035a043c2ced8c (diff)
downloadsrc-68d7185b6495e194e399289edc479ab85e5e4f3f.tar.gz
src-68d7185b6495e194e399289edc479ab85e5e4f3f.zip
The fsdb(8) utility uses the fsck_ffs(8) disk I/O interfaces, so
switch from using libufs's bread() to using fsck_ffs's getdatablk() when importing tools/diag/prtblnos's prtblknos(). Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=365912
Diffstat (limited to 'sbin/fsdb')
-rw-r--r--sbin/fsdb/fsdb.c2
-rw-r--r--sbin/fsdb/fsdbutil.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index 5b179970a08e..ffffa389a206 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -109,6 +109,8 @@ main(int argc, char *argv[])
sblock_init();
if (!setup(fsys))
errx(1, "cannot set up file system `%s'", fsys);
+ if (fswritefd < 0)
+ nflag++;
printf("%s file system `%s'\nLast Mounted on %s\n",
nflag? "Examining": "Editing", fsys, sblock.fs_fsmnt);
rval = cmdloop();
diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c
index fb7929913209..2c18d9910c6f 100644
--- a/sbin/fsdb/fsdbutil.c
+++ b/sbin/fsdb/fsdbutil.c
@@ -53,7 +53,7 @@ static const char rcsid[] =
#include "fsdb.h"
#include "fsck.h"
-void prtblknos(struct uufsd *disk, union dinode *dp);
+void prtblknos(struct fs *fs, union dinode *dp);
char **
crack(char *line, int *argc)
@@ -236,7 +236,7 @@ printactive(int doblocks)
case IFSOCK:
case IFIFO:
if (doblocks)
- prtblknos(&disk, curinode);
+ prtblknos(&sblock, curinode);
else
printstat("current inode", curinum, curinode);
break;