From: Ben Gras Date: Mon, 8 Aug 2005 12:17:30 +0000 (+0000) Subject: Prettier error message in FS if block size too large X-Git-Tag: v3.1.0~405 X-Git-Url: http://zhaoyanbai.com/repos/doc/html/static/gitweb.css?a=commitdiff_plain;h=48469b737bc29d5cdfbe6a2e8205b6c57db3099e;p=minix.git Prettier error message in FS if block size too large --- 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);