From 48469b737bc29d5cdfbe6a2e8205b6c57db3099e Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 8 Aug 2005 12:17:30 +0000 Subject: [PATCH] Prettier error message in FS if block size too large --- servers/fs/super.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/servers/fs/super.c b/servers/fs/super.c index e3d2b0e71..05cfe16ba 100644 --- a/servers/fs/super.c +++ b/servers/fs/super.c @@ -283,10 +283,16 @@ register struct super_block *sp; /* pointer to a superblock */ sp->s_nindirs = V2_INDIRECTS(sp->s_block_size); } - if(sp->s_block_size < MIN_BLOCK_SIZE || sp->s_block_size > MAX_BLOCK_SIZE) { + if(sp->s_block_size < MIN_BLOCK_SIZE) { printf("block size (%d) out of range\n", sp->s_block_size); return EINVAL; } + if(sp->s_block_size > MAX_BLOCK_SIZE) { + printf("Filesystem block size is %d kB; maximum filesystem\n" + "block size is %d kB. This limit can be increased by recompiling.\n", + sp->s_block_size/1024, MAX_BLOCK_SIZE/1024); + return EINVAL; + } if((sp->s_block_size % 512) != 0) { printf("block size (%d) not multiple of sector size\n", sp->s_block_size); -- 2.44.0