aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2018-11-13 21:40:56 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2018-11-13 21:40:56 +0000
commit9fc5d538fc57f438ca860e07db191b946b4768c9 (patch)
tree0f73178df156f836c4d9dde3af92b526b95c4e72 /tools
parentf183fb162c1dbc58cc3f7e2c27891bd881db2bf2 (diff)
downloadsrc-9fc5d538fc57f438ca860e07db191b946b4768c9.tar.gz
src-9fc5d538fc57f438ca860e07db191b946b4768c9.zip
In preparation for adding inode check-hashes, clean up and
document the libufs interface for fetching and storing inodes. The undocumented getino / putino interface has been replaced with a new getinode / putinode interface. Convert the utilities that had been using the undocumented interface to use the new documented interface. No functional change (as for now the libufs library does not do inode check-hashes). Reviewed by: kib Tested by: Peter Holm Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=340411
Diffstat (limited to 'tools')
-rw-r--r--tools/diag/prtblknos/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/diag/prtblknos/main.c b/tools/diag/prtblknos/main.c
index 51d5b135a5ea..c3abb2babad1 100644
--- a/tools/diag/prtblknos/main.c
+++ b/tools/diag/prtblknos/main.c
@@ -47,7 +47,7 @@ main(argc, argv)
char *argv[];
{
struct uufsd disk;
- union dinode *dp;
+ union dinodep dp;
struct fs *fs;
struct stat sb;
struct statfs sfb;
@@ -98,11 +98,11 @@ main(argc, argv)
(void)printf("%s (inode #%jd): ", filename,
(intmax_t)inonum);
- if ((error = getino(&disk, (void **)&dp, inonum, NULL)) < 0)
- warn("Read of inode %jd on %s failed",
- (intmax_t)inonum, fsname);
+ if ((error = getinode(&disk, &dp, inonum)) < 0)
+ warn("Read of inode %jd on %s failed: %s",
+ (intmax_t)inonum, fsname, disk.d_error);
- prtblknos(&disk, dp);
+ prtblknos(&disk, (union dinode *)dp.dp1);
}
exit(0);
}