]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: print structure padding fields consistently
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 6 Dec 2017 15:17:08 +0000 (09:17 -0600)
committerEric Sandeen <sandeen@redhat.com>
Wed, 6 Dec 2017 15:17:08 +0000 (09:17 -0600)
We are very inconsistent about how we print padding fields in on-disk
structures -- sometimes we hide it from printall, sometimes we deviate
from unsigned hex values, etc.  Make this all consistent -- always hide
padding values when printing the whole structure, always print them as
unsigned hex integers when explicitly requested.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
[sandeen: switch to never-print instead of always-print]
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/attr.c
db/dir2.c
db/dquot.c

index 75fe239364c49171cc905b6be11eccc106ac81db..9cbb20d31977b0d911c12cb40384e01d898ee9de 100644 (file)
--- a/db/attr.c
+++ b/db/attr.c
@@ -589,7 +589,7 @@ const field_t       attr3_node_hdr_flds[] = {
        { "info", FLDT_ATTR3_BLKINFO, OI(H3OFF(info)), C1, 0, TYP_NONE },
        { "count", FLDT_UINT16D, OI(H3OFF(__count)), C1, 0, TYP_NONE },
        { "level", FLDT_UINT16D, OI(H3OFF(__level)), C1, 0, TYP_NONE },
-       { "pad", FLDT_UINT32D, OI(H3OFF(__pad32)), C1, 0, TYP_NONE },
+       { "pad", FLDT_UINT32X, OI(H3OFF(__pad32)), C1, FLD_SKIPALL, TYP_NONE },
        { NULL }
 };
 
index 3e21a7b7018f9c2edca160624ac66d22761a4a9b..7f7ea5a7972cdbd9ae83501f89a6795ff67c31b8 100644 (file)
--- a/db/dir2.c
+++ b/db/dir2.c
@@ -977,7 +977,7 @@ const field_t       da3_node_hdr_flds[] = {
        { "info", FLDT_DA3_BLKINFO, OI(H3OFF(info)), C1, 0, TYP_NONE },
        { "count", FLDT_UINT16D, OI(H3OFF(__count)), C1, 0, TYP_NONE },
        { "level", FLDT_UINT16D, OI(H3OFF(__level)), C1, 0, TYP_NONE },
-       { "pad", FLDT_UINT32D, OI(H3OFF(__pad32)), C1, 0, TYP_NONE },
+       { "pad", FLDT_UINT32X, OI(H3OFF(__pad32)), C1, FLD_SKIPALL, TYP_NONE },
        { NULL }
 };
 
index 4e35df42b8d98bead376c94314fc338c1fd357ff..4fd1289db7d8dc58d181bd5468cc4f816e09e44d 100644 (file)
@@ -76,7 +76,7 @@ const field_t disk_dquot_flds[] = {
        { "btimer", FLDT_INT32D, OI(DOFF(btimer)), C1, 0, TYP_NONE },
        { "iwarns", FLDT_QWARNCNT, OI(DOFF(iwarns)), C1, 0, TYP_NONE },
        { "bwarns", FLDT_QWARNCNT, OI(DOFF(bwarns)), C1, 0, TYP_NONE },
-       { "pad0", FLDT_INT32D, OI(DOFF(pad0)), C1, FLD_SKIPALL, TYP_NONE },
+       { "pad0", FLDT_UINT32X, OI(DOFF(pad0)), C1, FLD_SKIPALL, TYP_NONE },
        { "rtb_hardlimit", FLDT_QCNT, OI(DOFF(rtb_hardlimit)), C1, 0,
          TYP_NONE },
        { "rtb_softlimit", FLDT_QCNT, OI(DOFF(rtb_softlimit)), C1, 0,