From 251526de585571ab3a42aca0e6fced6acaf9411b Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 25 Jan 2015 17:37:03 +0000 Subject: [PATCH] kernel.h: inode lengths are unsigned, tell the compiler this --- Kernel/include/kernel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Kernel/include/kernel.h b/Kernel/include/kernel.h index 6412f951..7d09e34c 100644 --- a/Kernel/include/kernel.h +++ b/Kernel/include/kernel.h @@ -84,6 +84,7 @@ struct tms { #define C_TIME 4 typedef int32_t off_t; /* 32MB file and fs size limit */ +typedef uint32_t uoff_t; /* Internal use so we can keep the compiler happy */ typedef uint16_t blkno_t; /* Can have 65536 512-byte blocks in filesystem */ #define NULLBLK ((blkno_t)-1) @@ -115,7 +116,7 @@ typedef struct dinode { uint16_t i_nlink; uint16_t i_uid; uint16_t i_gid; - off_t i_size; + uoff_t i_size; /* Never negative */ uint32_t i_atime; /* Breaks in 2038 */ uint32_t i_mtime; /* Need to hide some extra bits ? */ uint32_t i_ctime; /* 24 bytes */ -- 2.34.1