[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [gfs2-utils PATCH 2/3] gfs2_edit: display pointer offsets for directory dinodes



This patch prints "pointer X" on the hex display for directory
dinodes like it does for indirect blocks.
---
 gfs2/edit/hexedit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index d67389e..f0d9789 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -954,7 +954,8 @@ static int hexdump(uint64_t startaddr, int len)
 		if (cursor_line) {
 			if (block_type == GFS2_METATYPE_IN ||
 			    ((block_type == GFS2_METATYPE_DI) &&
-			     ((struct gfs2_dinode*)bh->b_data)->di_height)) {
+			     ((struct gfs2_dinode*)bh->b_data)->di_height) ||
+			     S_ISDIR(di.di_mode)) {
 				int ptroffset = edit_row[dmode] * 16 +
 					edit_col[dmode];
 
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]