diff options
author | Kirk McKusick <mckusick@FreeBSD.org> | 2018-11-13 21:40:56 +0000 |
---|---|---|
committer | Kirk McKusick <mckusick@FreeBSD.org> | 2018-11-13 21:40:56 +0000 |
commit | 9fc5d538fc57f438ca860e07db191b946b4768c9 (patch) | |
tree | 0f73178df156f836c4d9dde3af92b526b95c4e72 /lib/libufs/libufs.h | |
parent | f183fb162c1dbc58cc3f7e2c27891bd881db2bf2 (diff) | |
download | src-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 'lib/libufs/libufs.h')
-rw-r--r-- | lib/libufs/libufs.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libufs/libufs.h b/lib/libufs/libufs.h index 4598a9999ce2..dbd378949877 100644 --- a/lib/libufs/libufs.h +++ b/lib/libufs/libufs.h @@ -35,6 +35,10 @@ /* * libufs structures. */ +union dinodep { + struct ufs1_dinode *dp1; + struct ufs2_dinode *dp2; +}; /* * userland ufs disk. @@ -49,6 +53,7 @@ struct uufsd { caddr_t d_inoblock; /* inode block */ uint32_t d_inomin; /* low inode (not ino_t for ABI compat) */ uint32_t d_inomax; /* high inode (not ino_t for ABI compat) */ + union dinodep d_dp; /* pointer to currently active inode */ union { struct fs d_fs; /* filesystem information */ char d_sb[MAXBSIZE]; @@ -135,8 +140,8 @@ int cgwrite1(struct uufsd *, int); /* * inode.c */ -int getino(struct uufsd *, void **, ino_t, int *); -int putino(struct uufsd *); +int getinode(struct uufsd *, union dinodep *, ino_t); +int putinode(struct uufsd *); /* * sblock.c |