[PATCH 07/10] make st_size in struct stat 64 bit

Sascha Hauer s.hauer at pengutronix.de
Tue Jun 26 15:55:00 EDT 2012


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 commands/ls.c        |    2 +-
 include/linux/stat.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/ls.c b/commands/ls.c
index ad609f3..fbcbadc 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -35,7 +35,7 @@ static void ls_one(const char *path, struct stat *s)
 	unsigned int namelen = strlen(path);
 
 	mkmodestr(s->st_mode, modestr);
-	printf("%s %10lu %*.*s\n", modestr, s->st_size, namelen, namelen, path);
+	printf("%s %10llu %*.*s\n", modestr, s->st_size, namelen, namelen, path);
 }
 
 int ls(const char *path, ulong flags)
diff --git a/include/linux/stat.h b/include/linux/stat.h
index bc7dce4..af022c5 100644
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
@@ -52,7 +52,7 @@ struct stat {
 	unsigned short st_gid;
 	unsigned short st_rdev;
 	unsigned short __pad2;
-	unsigned long  st_size;
+	loff_t  st_size;
 	unsigned long  st_blksize;
 	unsigned long  st_blocks;
 	unsigned long  st_atime;
-- 
1.7.10




More information about the barebox mailing list