mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-24 10:33:35 +08:00
mke2fs.c (PRS): If the device size is too big to be expressed
using a 1k blocksize, retry with a 4k blocksize. (Addresses Sourceforge bug #1106631)
This commit is contained in:
parent
d4dc0a9e29
commit
20953129e6
@ -1,3 +1,9 @@
|
||||
2005-01-27 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* mke2fs.c (PRS): If the device size is too big to be expressed
|
||||
using a 1k blocksize, retry with a 4k blocksize.
|
||||
(Addresses Sourceforge bug #1106631)
|
||||
|
||||
2005-01-26 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* Makefile.in (uninstall): Make sure "make uninstall" removes
|
||||
|
@ -702,7 +702,7 @@ static void show_stats(ext2_filsys fs)
|
||||
case EXT2_OS_LINUX: fputs("Linux", stdout); break;
|
||||
case EXT2_OS_HURD: fputs("GNU/Hurd", stdout); break;
|
||||
case EXT2_OS_MASIX: fputs ("Masix", stdout); break;
|
||||
case EXT2_OS_FREEBSD: fputs ("FerrBSD", stdout); break;
|
||||
case EXT2_OS_FREEBSD: fputs ("FreeBSD", stdout); break;
|
||||
case EXT2_OS_LITES: fputs ("Lites", stdout); break;
|
||||
default: fputs(_("(unknown os)"), stdout);
|
||||
}
|
||||
@ -1252,10 +1252,20 @@ static void PRS(int argc, char *argv[])
|
||||
if (noaction && param.s_blocks_count) {
|
||||
dev_size = param.s_blocks_count;
|
||||
retval = 0;
|
||||
} else
|
||||
} else {
|
||||
retry:
|
||||
retval = ext2fs_get_device_size(device_name,
|
||||
EXT2_BLOCK_SIZE(¶m),
|
||||
&dev_size);
|
||||
if ((retval == EFBIG) &&
|
||||
(blocksize == 0) &&
|
||||
(param.s_log_block_size == 0)) {
|
||||
param.s_log_block_size = 2;
|
||||
blocksize = 4096;
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
|
||||
if (retval && (retval != EXT2_ET_UNIMPLEMENTED)) {
|
||||
com_err(program_name, retval,
|
||||
_("while trying to determine filesystem size"));
|
||||
|
Loading…
Reference in New Issue
Block a user