]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: print one array element per line
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Oct 2016 22:14:32 +0000 (15:14 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 26 Oct 2016 18:14:06 +0000 (11:14 -0700)
Print one array element per line so that the debugger output isn't
a gigantic pile of screen snow.

Before (inobt):

xfs_db> p recs
recs[1-55] = [startino,holemask,count,freecount,free]
1:[128,0,64,0,0] 2:[4288,0xff,32,0,0xffffffff] 3:[4352,0,64,0,0]
4:[4416,0,64,10,0x1f0003e000000000] 5:[4480,0,64,17,0xc00e1803c2007840]

After:

xfs_db> p recs
recs[1-55] = [startino,holemask,count,freecount,free]
1:[128,0,64,0,0]
2:[4288,0xff,32,0,0xffffffff]
3:[4352,0,64,0,0]
4:[4416,0,64,10,0x1f0003e000000000]
5:[4480,0,64,17,0xc00e1803c2007840]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
db/print.c

index 998daf45d54d74f2e2ccda14fc0fc8606fc5f280..e31372ff62e4dd547a4b7e39b87e4f805c0ed055 100644 (file)
@@ -197,7 +197,7 @@ print_sarray(
             i < count && !seenint();
             i++, bitoff += size) {
                if (array)
-                       dbprintf("%d:", i + base);
+                       dbprintf("\n%d:", i + base);
                for (f = flds, first = 1; f->name; f++) {
                        if (f->flags & FLD_SKIPALL)
                                continue;