From: Theodore Ts'o Date: Mon, 7 Jul 2008 00:57:17 +0000 (-0400) Subject: mke2fs: Print a better error msg when ext2fs_get_device_size() returns EFBIG X-Git-Tag: v1.41-WIP-0707~9 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f8df04bcc638585ee73cb795153f4456279b9b85;p=tools%2Fe2fsprogs.git mke2fs: Print a better error msg when ext2fs_get_device_size() returns EFBIG Print a message when mke2fs uses a default blocksize from an external journal device, and print a more self-explanatory message so that if that blocksize is used and ext2fs_get_device_size() returns EFBIG, the user has a better chance of understanding why mke2fs issued that error message. Addresses-Debian-Bug: #488663 Signed-off-by: "Theodore Ts'o" --- diff --git a/misc/mke2fs.c b/misc/mke2fs.c index c47470b..352e66b 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -1353,6 +1353,7 @@ static void PRS(int argc, char *argv[]) exit(1); } blocksize = jfs->blocksize; + printf(_("Using journal device's blocksize: %d\n"), blocksize); fs_param.s_log_block_size = int_log2(blocksize >> EXT2_MIN_BLOCK_LOG_SIZE); ext2fs_close(jfs); @@ -1404,6 +1405,13 @@ static void PRS(int argc, char *argv[]) } } + if (retval == EFBIG) { + fprintf(stderr, _("%s: Size of device %s too big " + "to be expressed in 32 bits\n\t" + "using a blocksize of %d.\n"), + program_name, device_name, EXT2_BLOCK_SIZE(&fs_param)); + exit(1); + } if (retval && (retval != EXT2_ET_UNIMPLEMENTED)) { com_err(program_name, retval, _("while trying to determine filesystem size"));