From 40d3c4c50d62f34a1f9be091721d4e8d837c5092 Mon Sep 17 00:00:00 2001 From: Andrew Price Date: Apr 20 2021 09:33:00 +0000 Subject: Remove GFS2_HAS_DE_RAHEAD/COOKIE conditionals Our own gfs2_ondisk.h has de_rahead and de_cookie so there's no need for these conditionals. Signed-off-by: Andrew Price --- diff --git a/configure.ac b/configure.ac index 5cb0770..a512f9d 100644 --- a/configure.ac +++ b/configure.ac @@ -126,10 +126,6 @@ AC_SUBST([udevdir], [$with_udevdir]) AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h stddef.h sys/file.h sys/ioctl.h sys/mount.h sys/time.h sys/vfs.h syslog.h termios.h]) AC_CHECK_HEADER([linux/fs.h], [], [AC_MSG_ERROR([Unable to find linux/fs.h])]) AC_CHECK_HEADER([linux/limits.h], [], [AC_MSG_ERROR([Unable to find linux/limits.h])]) -AC_CHECK_MEMBER([struct gfs2_dirent.de_rahead],[AC_DEFINE([GFS2_HAS_DE_RAHEAD],[],[Dirent readahead field])], - [], [[#include ]]) -AC_CHECK_MEMBER([struct gfs2_dirent.de_cookie],[AC_DEFINE([GFS2_HAS_DE_COOKIE],[],[Dirent cookie field])], - [], [[#include ]]) AC_CHECK_MEMBER([struct gfs2_rgrp.rg_skip],[AC_DEFINE([GFS2_HAS_RG_SKIP],[],[Next resource group pointer])], [], [[#include ]]) AC_CHECK_MEMBER([struct gfs2_rgrp.rg_data0],[AC_DEFINE([GFS2_HAS_RG_RI_FIELDS],[],[Resource group fields duplicated from the rindex])], diff --git a/gfs2/edit/extended.c b/gfs2/edit/extended.c index b8c61ee..91609bd 100644 --- a/gfs2/edit/extended.c +++ b/gfs2/edit/extended.c @@ -335,18 +335,14 @@ static int display_leaf(struct iinfo *ind) strcpy(edit_fmt, "%llx"); } } - print_gfs2("%d/%d [%08x] %lld/%"PRId64" (0x%llx/0x%"PRIx64") +%u: ", + print_gfs2("%d/%d [%08x] %lld/%"PRId64" (0x%llx/0x%"PRIx64") +%"PRIu16": ", total_dirents, d + 1, ind->ii[0].dirent[d].dirent.de_hash, ind->ii[0].dirent[d].dirent.de_inum.no_formal_ino, ind->ii[0].dirent[d].block, ind->ii[0].dirent[d].dirent.de_inum.no_formal_ino, ind->ii[0].dirent[d].block, -#ifdef GFS2_HAS_DE_RAHEAD - (unsigned int)ind->ii[0].dirent[d].dirent.de_rahead -#else - 0 -#endif + ind->ii[0].dirent[d].dirent.de_rahead ); } print_inode_type(ind->ii[0].dirent[d].dirent.de_type); diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c index 2be8704..d642424 100644 --- a/gfs2/libgfs2/meta.c +++ b/gfs2/libgfs2/meta.c @@ -481,17 +481,9 @@ F(de_hash, .flags = LGFS2_MFF_CHECK) F(de_rec_len, .flags = LGFS2_MFF_BYTES) F(de_name_len, .flags = LGFS2_MFF_BYTES) F(de_type) -#ifdef GFS2_HAS_DE_RAHEAD F(de_rahead) -#ifdef GFS2_HAS_DE_COOKIE F(de_cookie) RF(pad3) -#else -RF(pad2) -#endif /* GFS2_HAS_DE_COOKIE */ -#else -RF(__pad) -#endif /* GFS2_HAS_DE_RAHEAD */ }; #undef STRUCT diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c index dffd222..6e96914 100644 --- a/gfs2/libgfs2/ondisk.c +++ b/gfs2/libgfs2/ondisk.c @@ -404,17 +404,9 @@ void gfs2_dirent_in(struct gfs2_dirent *de, char *buf) CPIN_16(de, str, de_rec_len); CPIN_16(de, str, de_name_len); CPIN_16(de, str, de_type); -#ifdef GFS2_HAS_DE_RAHEAD CPIN_16(de, str, de_rahead); -#ifdef GFS2_HAS_DE_COOKIE CPIN_32(de, str, de_cookie); CPIN_08(de, str, pad3, 8); -#else - CPIN_08(de, str, pad2, 12); -#endif /* GFS2_HAS_DE_COOKIE */ -#else - CPIN_08(de, str, __pad, 14); -#endif /* GFS2_HAS_DE_RAHEAD */ } void gfs2_dirent_out(struct gfs2_dirent *de, char *buf) @@ -426,17 +418,9 @@ void gfs2_dirent_out(struct gfs2_dirent *de, char *buf) CPOUT_16(de, str, de_rec_len); CPOUT_16(de, str, de_name_len); CPOUT_16(de, str, de_type); -#ifdef GFS2_HAS_DE_RAHEAD CPOUT_16(de, str, de_rahead); -#ifdef GFS2_HAS_DE_COOKIE CPOUT_32(de, str, de_cookie); CPOUT_08(de, str, pad3, 8); -#else - CPOUT_08(de, str, pad2, 12); -#endif /* GFS2_HAS_DE_COOKIE */ -#else - CPOUT_08(de, str, __pad, 14); -#endif /* GFS2_HAS_DE_RAHEAD */ } void gfs2_leaf_in(struct gfs2_leaf *lf, char *buf)