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

Commit eb42170e authored by Kenny Root's avatar Kenny Root
Browse files

Display file sizes larger than 2GB correctly

File size was cast to a signed integer which displayed files over 2GB as
negative sizes on devices. Use a long long for printing instead which
matches the stat struct.

Change-Id: I0ec07f33716bb4c2e5d120633ed435f637238f46
parent 93b0cb40
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -173,8 +173,8 @@ static int listfile_long(const char *path, int flags)
               date, name);
        break;
    case S_IFREG:
        printf("%s %-8s %-8s %8d %s %s\n",
               mode, user, group, (int) s.st_size, date, name);
        printf("%s %-8s %-8s %8lld %s %s\n",
               mode, user, group, s.st_size, date, name);
        break;
    case S_IFLNK: {
        char linkto[256];