mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-08-27 19:50:23 +00:00
Rename local variables to mke2fs_*_ver
To better reflect that they represent the version of mke2fs executable from the e2fsprogs package, even though the executable is called as mkfs.ext4. $ ls -il /sbin/mke2fs /sbin/mkfs.ext* 1978670 -rwxr-xr-x. 4 root root 96384 Aug 9 2019 /sbin/mke2fs 1978670 -rwxr-xr-x. 4 root root 96384 Aug 9 2019 /sbin/mkfs.ext2 1978670 -rwxr-xr-x. 4 root root 96384 Aug 9 2019 /sbin/mkfs.ext3 1978670 -rwxr-xr-x. 4 root root 96384 Aug 9 2019 /sbin/mkfs.ext4 $ mkfs.ext4 -V mke2fs 1.42.9 (28-Dec-2013) Using EXT2FS Library version 1.42.9 $ mke2fs -V mke2fs 1.42.9 (28-Dec-2013) Using EXT2FS Library version 1.42.9
This commit is contained in:
parent
bfbd324d39
commit
21a2da9e24
18
src/ext2.cc
18
src/ext2.cc
|
@ -47,11 +47,11 @@ FS ext2::get_filesystem_support()
|
|||
if ( specific_type == FS_EXT4 )
|
||||
{
|
||||
Utils::execute_command( mkfs_cmd + " -V", output, error, true );
|
||||
int mke4fs_major_ver = 0;
|
||||
int mke4fs_minor_ver = 0;
|
||||
int mke4fs_patch_ver = 0;
|
||||
int mke2fs_major_ver = 0;
|
||||
int mke2fs_minor_ver = 0;
|
||||
int mke2fs_patch_ver = 0;
|
||||
if (sscanf(error.c_str(), "mke2fs %d.%d.%d",
|
||||
&mke4fs_major_ver, &mke4fs_minor_ver, &mke4fs_patch_ver) >= 2)
|
||||
&mke2fs_major_ver, &mke2fs_minor_ver, &mke2fs_patch_ver) >= 2)
|
||||
{
|
||||
// Ext4 64bit feature was added in e2fsprogs 1.42, but
|
||||
// only enable large volumes from 1.42.9 when a large
|
||||
|
@ -60,9 +60,9 @@ FS ext2::get_filesystem_support()
|
|||
// http://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.42
|
||||
// * Release notes, E2fsprogs 1.42.9 (December 28, 2013)
|
||||
// http://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.42.9
|
||||
have_64bit_feature = ( mke4fs_major_ver > 1 )
|
||||
|| ( mke4fs_major_ver == 1 && mke4fs_minor_ver > 42 )
|
||||
|| ( mke4fs_major_ver == 1 && mke4fs_minor_ver == 42 && mke4fs_patch_ver >= 9 );
|
||||
have_64bit_feature = (mke2fs_major_ver > 1)
|
||||
|| (mke2fs_major_ver == 1 && mke2fs_minor_ver > 42)
|
||||
|| (mke2fs_major_ver == 1 && mke2fs_minor_ver == 42 && mke2fs_patch_ver >= 9);
|
||||
|
||||
// (#766910) E2fsprogs 1.43 creates 64bit ext4 file
|
||||
// systems by default. RHEL/CentOS 7 configured e2fsprogs
|
||||
|
@ -72,8 +72,8 @@ FS ext2::get_filesystem_support()
|
|||
// removed mke2fs.conf(5) auto_64-bit_support option to
|
||||
// avoid the issues with multiple boot loaders not working
|
||||
// with 64bit ext4 file systems.
|
||||
force_auto_64bit = ( mke4fs_major_ver > 1 )
|
||||
|| ( mke4fs_major_ver == 1 && mke4fs_minor_ver >= 42 );
|
||||
force_auto_64bit = (mke2fs_major_ver > 1)
|
||||
|| (mke2fs_major_ver == 1 && mke2fs_minor_ver >= 42);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue