'fs lq' output separates its space values by whitespace, but 'fs df'
does not, which was causing the human-readable output for 'fs' to not
be properly aligned with the output headers. Modify HumanPrintSpace to
take up exactly 10 characters (9 for the value, 1 for the exponent),
and have the callers print out an extra space if appropriate.
Change-Id: Ied81e73e1e84df34e63fdf0c80ad86341bea0cd4
Reviewed-on: http://gerrit.openafs.org/2311
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
exponent++;
space /= 1024;
}
- printf(" %8.1f%c", space, power_letter[exponent]);
+ printf("%9.1f%c", space, power_letter[exponent]);
}
static int
if (status->MaxQuota != 0) {
if (human) {
+ printf(" ");
HumanPrintSpace(status->MaxQuota);
+ printf(" ");
HumanPrintSpace(status->BlocksInUse);
}
else
QuotaUsed =
((((double)status->BlocksInUse) / status->MaxQuota) * 100.0);
} else {
- printf(" no limit");
+ printf(" no limit ");
if (human)
HumanPrintSpace(status->BlocksInUse);
else
- printf(" %10d", status->BlocksInUse);
+ printf("%10d", status->BlocksInUse);
}
if (QuotaUsed > 90.0) {
printf("%5.0f%%<<", QuotaUsed);