From 80e2b3ade66a58ca1d004723feb58455e74ff576 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 12 Jan 2007 16:53:12 +0000 Subject: [PATCH] Truncate s_max_size at LONG_MAX, now that off_t is signed. --- commands/simple/mkfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/simple/mkfs.c b/commands/simple/mkfs.c index a36a6a580..315212b85 100755 --- a/commands/simple/mkfs.c +++ b/commands/simple/mkfs.c @@ -35,8 +35,9 @@ #undef EXTERN #define EXTERN /* get rid of EXTERN by making it null */ -#include "../../servers/mfs/type.h" #include "../../servers/mfs/super.h" +#include "../../servers/mfs/type.h" +#include "../../servers/mfs/inode.h" #include #ifndef max @@ -493,7 +494,7 @@ ino_t inodes; sup->s_magic = SUPER_V3; sup->s_block_size = block_size; sup->s_disk_version = 0; -#define MAX_MAX_SIZE ((unsigned long) 0xffffffff) +#define MAX_MAX_SIZE ((unsigned long) LONG_MAX) if(MAX_MAX_SIZE/block_size < zo) { sup->s_max_size = MAX_MAX_SIZE; } -- 2.44.0