kernel.h: add defines for new length checking
authorAlan Cox <alan@linux.intel.com>
Sat, 26 Dec 2015 23:01:53 +0000 (23:01 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 26 Dec 2015 23:01:53 +0000 (23:01 +0000)
Kernel/include/kernel.h

index 78d0cb2..c365c28 100644 (file)
@@ -115,6 +115,7 @@ typedef uint16_t blkno_t;    /* Can have 65536 512-byte blocks in filesystem */
 #define BLKSIZE                512
 #define BLKSHIFT       9
 #define BLKMASK                511
+#define BLKOVERSIZE    25      /* Bits 25+ mean we exceeded the file size */
 
 /* Help the 8bit compilers out by preventing any 32bit promotions */
 #define BLKOFF(x)      (((uint16_t)(x)) & BLKMASK)