Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 9383e745e23602bc45f9c92184feea59 > files > 79

gfs2-utils-0.1.62-28.el5.src.rpm

commit 816b9ce11ad33940284bde48787677e006ae6454
Author: Bob Peterson <bob@ganesha.peterson>
Date:   Mon Aug 31 11:32:57 2009 -0500

    gfs2_edit: Add missing superblock fields for gfs1 file systems
    
    This patch adds GFS1 fields sb_flags and sb_seg_size when
    printing structures for GFS1 file system superblocks.
    
    rhbz#503529

diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c
index ab41796..bb1c9eb 100644
--- a/gfs2/edit/gfs2hex.c
+++ b/gfs2/edit/gfs2hex.c
@@ -471,10 +471,12 @@ void gfs2_sb_print2(struct gfs2_sb *sb)
 
 	pv(sb, sb_fs_format, "%u", "0x%x");
 	pv(sb, sb_multihost_format, "%u", "0x%x");
-
+	if (gfs1)
+		pv(sbd1, sb_flags, "%u", "0x%x");
 	pv(sb, sb_bsize, "%u", "0x%x");
 	pv(sb, sb_bsize_shift, "%u", "0x%x");
 	if (gfs1) {
+		pv(sbd1, sb_seg_size, "%u", "0x%x");
 		gfs2_inum_print2("jindex ino", &sbd1->sb_jindex_di);
 		gfs2_inum_print2("rindex ino", &sbd1->sb_rindex_di);
 	}
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index c180256..8cc4b1c 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -1681,6 +1681,8 @@ void read_superblock(int fd)
 		struct gfs_sb *sbbuf = (struct gfs_sb *)buf;
 
 		gfs1 = TRUE;
+		sbd1->sb_flags = be32_to_cpu(sbbuf->sb_flags);
+		sbd1->sb_seg_size = be32_to_cpu(sbbuf->sb_seg_size);
 		gfs2_inum_in(&sbd1->sb_rindex_di, (void *)&sbbuf->sb_rindex_di);
 		gfs2_inum_in(&gfs1_quota_di, (void *)&sbbuf->sb_quota_di);
 		gfs2_inum_in(&gfs1_license_di, (void *)&sbbuf->sb_license_di);