aboutsummaryrefslogtreecommitdiff
path: root/sbin/clri
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 /sbin/clri
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 'sbin/clri')
-rw-r--r--sbin/clri/clri.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c
index 0c0f8f0947a3..7f9a4f09bfe0 100644
--- a/sbin/clri/clri.c
+++ b/sbin/clri/clri.c
@@ -62,11 +62,6 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <unistd.h>
-union dinodep {
- struct ufs1_dinode *dp1;
- struct ufs2_dinode *dp2;
-};
-
static void
usage(void)
{
@@ -104,8 +99,8 @@ main(int argc, char *argv[])
}
(void)printf("clearing %d\n", inonum);
- if (getino(&disk, (void **)&dp, inonum, NULL) == -1) {
- printf("getino: %s\n", disk.d_error);
+ if (getinode(&disk, &dp, inonum) == -1) {
+ printf("getinode: %s\n", disk.d_error);
exitval = 1;
continue;
}
@@ -119,7 +114,7 @@ main(int argc, char *argv[])
memset(dp.dp2, 0, sizeof(*dp.dp2));
dp.dp2->di_gen = generation;
}
- putino(&disk);
+ putinode(&disk);
(void)fsync(disk.d_fd);
}
(void)ufs_disk_close(&disk);