]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: add header to freesp -d output
authorEric Sandeen <sandeen@redhat.com>
Wed, 21 Aug 2013 22:40:47 +0000 (22:40 +0000)
committerRich Johnston <rjohnston@sgi.com>
Tue, 27 Aug 2013 18:50:11 +0000 (13:50 -0500)
Today, xfs_db's freesp -d command dumps out a bunch of numbers:

# xfs_db -c "freesp -d" /dev/sdb1
       0        4        1
       0        5        1
       0        6        1
       0        7        1
       0       12   174772
...

which are not useful to the non-code-reading user.
Add some headers:

# xfs_db -c "freesp -d" /dev/sdb1
    agno    agbno      len
       0        4        1
       0        5        1
       0        6        1
       0        7        1
       0       12   174772
...

so there's at least some context.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
db/freesp.c

index 6f69ebaa38babee0d229aa74cbed8d245d6465d8..361fa96da75cc13f44b68706d6a4f703f1cc05b5 100644 (file)
@@ -96,6 +96,10 @@ freesp_f(
 
        if (!init(argc, argv))
                return 0;
+
+       if (dumpflag)
+               dbprintf("%8s %8s %8s\n", "agno", "agbno", "len");
+
        for (agno = 0; agno < mp->m_sb.sb_agcount; agno++)  {
                if (inaglist(agno))
                        scan_ag(agno);