This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-sparse
in repository gfs2-utils.
commit 411aa2e8f94596b93c1690dfd5e9ae0602a9ce33
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Tue Apr 27 10:20:02 2021 +0100
libgfs2: Convert gfs2_leaf_print to accept big-endian data
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/edit/gfs2hex.c | 4 +---
gfs2/libgfs2/libgfs2.h | 2 +-
gfs2/libgfs2/ondisk.c | 24 +++++++++++++-----------
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c
index 8fdc68a0..b8faf33a 100644
--- a/gfs2/edit/gfs2hex.c
+++ b/gfs2/edit/gfs2hex.c
@@ -454,7 +454,6 @@ int display_gfs2(char *buf)
{
struct gfs2_meta_header mh;
struct gfs2_rgrp rg;
- struct gfs2_leaf lf;
struct gfs_log_header lh1;
struct gfs2_log_header lh;
@@ -504,8 +503,7 @@ int display_gfs2(char *buf)
break;
case GFS2_METATYPE_LF:
- gfs2_leaf_in(&lf, buf);
- gfs2_leaf_print(&lf);
+ lgfs2_leaf_print(buf);
break;
case GFS2_METATYPE_JD:
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index acd98d23..e861a8b9 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -725,7 +725,6 @@ extern void gfs2_rindex_print(const struct gfs2_rindex *ri);
extern void gfs2_rgrp_print(const struct gfs2_rgrp *rg);
extern void gfs2_quota_print(const struct gfs2_quota *qu);
extern void gfs2_dinode_print(const struct gfs2_dinode *di);
-extern void gfs2_leaf_print(const struct gfs2_leaf *lf);
extern void gfs2_log_header_print(const struct gfs2_log_header *lh);
/* These expect on-disk data instead of native-endian structs */
extern void lgfs2_meta_header_print(void *mhp);
@@ -733,6 +732,7 @@ extern void lgfs2_log_descriptor_print(void *ldp);
extern void lgfs2_quota_change_print(void *qcp);
extern void lgfs2_statfs_change_print(void *scp);
extern void lgfs2_ea_header_print(void *eap);
+extern void lgfs2_leaf_print(void *lfp);
__END_DECLS
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index a1ba73c3..1450d973 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -456,17 +456,19 @@ void gfs2_leaf_out(struct gfs2_leaf *lf, char *buf)
CPOUT_08(lf, str, lf_reserved2, 40);
}
-void gfs2_leaf_print(const struct gfs2_leaf *lf)
-{
- gfs2_meta_header_print(&lf->lf_header);
- pv(lf, lf_depth, "%"PRIu16, "0x%"PRIx16);
- pv(lf, lf_entries, "%"PRIu16, "0x%"PRIx16);
- pv(lf, lf_dirent_format, "%"PRIu32, "0x%"PRIx32);
- pv(lf, lf_next, "%"PRIu64, "0x%"PRIx64);
- pv(lf, lf_inode, "%"PRIu64, "0x%"PRIx64);
- pv(lf, lf_dist, "%"PRIu32, "0x%"PRIx32);
- pv(lf, lf_nsec, "%"PRIu32, "0x%"PRIx32);
- pv(lf, lf_sec, "%"PRIu64, "0x%"PRIx64);
+void lgfs2_leaf_print(void *lfp)
+{
+ struct gfs2_leaf *lf = lfp;
+
+ lgfs2_meta_header_print(&lf->lf_header);
+ printbe16(lf, lf_depth);
+ printbe16(lf, lf_entries);
+ printbe32(lf, lf_dirent_format);
+ printbe64(lf, lf_next);
+ printbe64(lf, lf_inode);
+ printbe32(lf, lf_dist);
+ printbe32(lf, lf_nsec);
+ printbe64(lf, lf_sec);
}
void lgfs2_ea_header_print(void *eap)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.