mirror of https://github.com/vitalif/e2fsprogs
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" <tytso@mit.edu>bitmap-optimize
parent
b4d5105b25
commit
f8df04bcc6
|
@ -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"));
|
||||
|
|
Loading…
Reference in New Issue