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
diff --git a/toolbox/ls.c b/toolbox/ls.c
index f340a83..8799514 100644
--- a/toolbox/ls.c
+++ b/toolbox/ls.c
@@ -173,8 +173,8 @@
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];