Change default file system to ext4 (#711114)

In the Create New Partition dialog use ext4 as the default choice for
new file systems.  It has been the preferred file system of
distributions for many years.  Use ext3 and ext2 as second and third
choice defaults.  This handles RHEL/CentOS 5.x which doesn't support
ext4.

Bug #711114 - Change default fs to ext4
This commit is contained in:
Phillip Susi 2013-10-29 22:23:51 -04:00 committed by Mike Fleetwood
parent 98cd693818
commit 73f2c689f7
1 changed files with 7 additions and 4 deletions

View File

@ -345,9 +345,12 @@ void Dialog_Partition_New::Build_Filesystems_Menu( bool only_unformatted )
menu_filesystem .items() .back() .set_sensitive( menu_filesystem .items() .back() .set_sensitive(
! only_unformatted && FILESYSTEMS[ t ] .create && ! only_unformatted && FILESYSTEMS[ t ] .create &&
this ->selected_partition .get_byte_length() >= FILESYSTEMS[ t ] .MIN ) ; this ->selected_partition .get_byte_length() >= FILESYSTEMS[ t ] .MIN ) ;
//use ext2 as default filesystem //use ext4/3/2 as first/second/third choice default file system
if ( Utils::get_filesystem_string( FILESYSTEMS[ t ] .filesystem ) == "ext2" && //(Depends on ordering in FILESYSTEMS for preference)
menu_filesystem .items() .back() .sensitive() ) if ( ( FILESYSTEMS[ t ] .filesystem == FS_EXT2 ||
FILESYSTEMS[ t ] .filesystem == FS_EXT3 ||
FILESYSTEMS[ t ] .filesystem == FS_EXT4 ) &&
menu_filesystem .items() .back() .sensitive() )
{ {
first_creatable_fs=menu_filesystem .items() .size() - 1; first_creatable_fs=menu_filesystem .items() .size() - 1;
set_first=true; set_first=true;
@ -359,7 +362,7 @@ void Dialog_Partition_New::Build_Filesystems_Menu( bool only_unformatted )
if(!set_first) if(!set_first)
{ {
//find and set first enabled file system //find and set first enabled file system as last choice default
for ( unsigned int t = 0 ; t < menu_filesystem .items() .size() ; t++ ) for ( unsigned int t = 0 ; t < menu_filesystem .items() .size() ; t++ )
if ( menu_filesystem .items()[ t ] .sensitive() ) if ( menu_filesystem .items()[ t ] .sensitive() )
{ {