]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_quota: print and path output formatting: maintain reverse compatibility
authorBill O'Donnell <billodo@redhat.com>
Mon, 19 Sep 2016 06:02:41 +0000 (16:02 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 19 Sep 2016 06:02:41 +0000 (16:02 +1000)
This patch adjusts the formatting of the xfs_quota print and
path outputs, in order to maintain reverse compatability:
when -f flag isn't used, need to keep the output same as in
previous version.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
quota/path.c

index 01ccab4f6839c898d40604726d246c73461ebff5..57d14f0b55111d51bdc046a28e2c321face49f81 100644 (file)
@@ -36,13 +36,14 @@ printpath(
        int             c;
 
        if (index == 0) {
-               printf(_("%sFilesystem          Pathname\n"),
-                       number ? _("      ") : "");
+               printf(_("%s%sFilesystem          Pathname\n"),
+                      number ? _("      ") : "",
+                      foreign_allowed ? _("    ") : "");
        }
-       if (number) {
+       if (number)
                printf(_("%c%03d%c "), braces? '[':' ', index, braces? ']':' ');
-       }
-       printf("%s ", (path->fs_flags & FS_FOREIGN) ? "(F)" : "   ");
+       if (foreign_allowed)
+               printf("%s", (path->fs_flags & FS_FOREIGN) ? "(F) " : "    ");
        printf(_("%-19s %s"), path->fs_dir, path->fs_name);
        if (path->fs_flags & FS_PROJECT_PATH) {
                prj = getprprid(path->fs_prid);
@@ -51,7 +52,7 @@ printpath(
                        printf(_(", %s"), prj->pr_name);
                printf(")");
        } else if (xfsquotactl(XFS_GETQSTAT, path->fs_name, 0, 0,
-                               (void *)&qstat) == 0 && qstat.qs_flags) {
+                              (void *)&qstat) == 0 && qstat.qs_flags) {
                c = 0;
                printf(" (");
                if (qstat.qs_flags & XFS_QUOTA_UDQ_ENFD)