]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - scrub/common.c
xfs_scrub: fix fractional reporting of single inodes
[thirdparty/xfsprogs-dev.git] / scrub / common.c
index 96b86a26e75282966cb6c7db73e4d607deffa294..78afc4bff8c48c931b814c6c307c853a9f6f9e05 100644 (file)
@@ -200,10 +200,12 @@ no_prefix:
 double
 auto_units(
        unsigned long long      number,
-       char                    **units)
+       char                    **units,
+       int                     *precision)
 {
        if (debug > 1)
                goto no_prefix;
+       *precision = 1;
        if (number > 1000000000000ULL) {
                *units = "T";
                return number / 1000000000000.0;
@@ -220,6 +222,7 @@ auto_units(
 
 no_prefix:
        *units = "";
+       *precision = 0;
        return number;
 }