[gparted] Rename local variables to mke2fs_*_ver
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Rename local variables to mke2fs_*_ver
- Date: Fri, 28 Feb 2020 18:10:38 +0000 (UTC)
commit 21a2da9e24228b3f45d781dec1116a60f0d79b8e
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sun Feb 16 11:30:52 2020 +0000
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
src/ext2.cc | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/ext2.cc b/src/ext2.cc
index 00ebb25a..2322b2af 100644
--- a/src/ext2.cc
+++ b/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);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]