Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8db1e09 authored by Elliott Hughes's avatar Elliott Hughes Committed by Android Git Automerger
Browse files

am 777991d9: Merge "Fixed improper size displaying in \'df\' utility"

* commit '777991d9':
  Fixed improper size displaying in 'df' utility
parents e4e1a065 777991d9
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -9,16 +9,22 @@ static int ok = EXIT_SUCCESS;
static void printsize(long long n)
{
    char unit = 'K';
    n /= 1024;
    if (n > 1024) {
    long long t;

    n *= 10;

    if (n > 1024*1024*10) {
        n /= 1024;
        unit = 'M';
    }
    if (n > 1024) {

    if (n > 1024*1024*10) {
        n /= 1024;
        unit = 'G';
    }
    printf("%4lld%c", n, unit);

    t = (n + 512) / 1024;
    printf("%4lld.%1lld%c", t/10, t%10, unit);
}

static void df(char *s, int always) {