diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-04-28 18:43:55 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-28 18:43:55 +0000 |
commit | f694d7a9c42ea85b3d30d1735c1072b464daeea2 (patch) | |
tree | dd4ed4f55de937e63bdd649a4e29a2c5bf819703 | |
parent | 7c9c59fd0d885b0df360d46b2fe3adb5f5f253d5 (diff) | |
parent | 2d53cf8bad743b633b79343a12f3b77c62d8ba2c (diff) | |
download | fsck_msdos-f694d7a9c42ea85b3d30d1735c1072b464daeea2.tar.gz |
Merge "Sync with upstream 2ccadef (svn revision 360428):" am: 8bc9cb1ca2 am: 2f294595d9 am: 9601c6e26e am: 25f59e1524 am: 2d53cf8bad
Change-Id: Ie28578da64a13f9f8356f592f201c0189288b903
-rw-r--r-- | check.c | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -54,6 +54,8 @@ checkfilesys(const char *fname) int finish_dosdirsection=0; int mod = 0; int ret = 8; + int64_t freebytes; + int64_t badbytes; rdonly = alwaysno; if (!preen) @@ -129,37 +131,33 @@ checkfilesys(const char *fname) mod |= FSERROR; } + freebytes = (int64_t)boot.NumFree * boot.ClusterSize; + badbytes = (int64_t)boot.NumBad * boot.ClusterSize; + #ifdef HAVE_LIBUTIL_H char freestr[7], badstr[7]; - int64_t freebytes = boot.NumFree * boot.ClusterSize; humanize_number(freestr, sizeof(freestr), freebytes, "", HN_AUTOSCALE, HN_DECIMAL | HN_IEC_PREFIXES); if (boot.NumBad) { - int64_t badbytes = boot.NumBad * boot.ClusterSize; - humanize_number(badstr, sizeof(badstr), badbytes, "", HN_AUTOSCALE, HN_B | HN_DECIMAL | HN_IEC_PREFIXES); pwarn("%d files, %sB free (%d clusters), %sB bad (%d clusters)\n", - boot.NumFiles, - freestr, boot.NumFree, + boot.NumFiles, freestr, boot.NumFree, badstr, boot.NumBad); } else { pwarn("%d files, %sB free (%d clusters)\n", - boot.NumFiles, - freestr, boot.NumFree); + boot.NumFiles, freestr, boot.NumFree); } #else if (boot.NumBad) - pwarn("%d files, %d KiB free (%d clusters), %d KiB bad (%d clusters)\n", - boot.NumFiles, - boot.NumFree * boot.ClusterSize / 1024, boot.NumFree, - boot.NumBad * boot.ClusterSize / 1024, boot.NumBad); + pwarn("%d files, %jd KiB free (%d clusters), %jd KiB bad (%d clusters)\n", + boot.NumFiles, (intmax_t)freebytes / 1024, boot.NumFree, + (intmax_t)badbytes / 1024, boot.NumBad); else - pwarn("%d files, %d KiB free (%d clusters)\n", - boot.NumFiles, - boot.NumFree * boot.ClusterSize / 1024, boot.NumFree); + pwarn("%d files, %jd KiB free (%d clusters)\n", + boot.NumFiles, (intmax_t)freebytes / 1024, boot.NumFree); #endif if (mod && (mod & FSERROR) == 0) { |