"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/GParted_Core.cc" between
gparted-1.1.0.tar.gz and gparted-1.2.0.tar.gz

About: GParted is a graphical partition editor for creating, reorganizing, and deleting disk partitions (using GNU libparted).

GParted_Core.cc  (gparted-1.1.0):GParted_Core.cc  (gparted-1.2.0)
skipping to change at line 3349 skipping to change at line 3349
{ {
Glib::ustring fs_type = Utils::get_filesystem_string(part ition.fstype); Glib::ustring fs_type = Utils::get_filesystem_string(part ition.fstype);
// Lookup libparted file system type using GParted's name , as most // Lookup libparted file system type using GParted's name , as most
// match. Exclude cleared as the name won't be recognise d by // match. Exclude cleared as the name won't be recognise d by
// libparted and get_filesystem_string() has also transla ted it. // libparted and get_filesystem_string() has also transla ted it.
PedFileSystemType *lp_fs_type = NULL; PedFileSystemType *lp_fs_type = NULL;
if (partition.fstype != FS_CLEARED) if (partition.fstype != FS_CLEARED)
lp_fs_type = ped_file_system_type_get(fs_type.c_s tr()); lp_fs_type = ped_file_system_type_get(fs_type.c_s tr());
// If not found, and FS is udf, then try ntfs. // Ensure that UDF and exFAT get the required partition t
// Actually MBR 07 IFS (Microsoft Installable File System ype even
) or // when libparted doesn't know, or is to old to know, abo
// GPT BDP (Windows Basic Data Partition). ut them.
// Ref: https://serverfault.com/a/829172 // Required partition types:
if (! lp_fs_type && partition.fstype == FS_UDF) // * [on MBR] 07 IFS (Installable File System)
// * [on GPT] BDP (Basic Data Partition)
// Use NTFS to achieve this.
// References:
// * What is the partition id / filesystem type for UDF?
// https://serverfault.com/a/829172
// * exFAT file system specification
// https://docs.microsoft.com/en-us/windows/win32/filei
o/exfat-specification
// 10.2 Partition Tables
if (! lp_fs_type && (partition.fstype == FS_UDF || partit
ion.fstype == FS_EXFAT))
lp_fs_type = ped_file_system_type_get( "ntfs" ); lp_fs_type = ped_file_system_type_get( "ntfs" );
// default is Linux (83) // default is Linux (83)
if ( ! lp_fs_type ) if ( ! lp_fs_type )
lp_fs_type = ped_file_system_type_get( "ext2" ); lp_fs_type = ped_file_system_type_get( "ext2" );
bool supports_lvm_flag = ped_partition_is_flag_available( lp_partition, PED_PARTITION_LVM ); bool supports_lvm_flag = ped_partition_is_flag_available( lp_partition, PED_PARTITION_LVM );
if (lp_fs_type && partition.fstype != FS_LVM2_PV) if (lp_fs_type && partition.fstype != FS_LVM2_PV)
{ {
skipping to change at line 3862 skipping to change at line 3870
{ {
OperationDetail & od = operationdetail .get_last_child() ; OperationDetail & od = operationdetail .get_last_child() ;
od .add_child( OperationDetail( Glib::ustring::compose( _("flush operating system cache of %1"), od .add_child( OperationDetail( Glib::ustring::compose( _("flush operating system cache of %1"),
lp_device ->pat h ) ) ) ; lp_device ->pat h ) ) ) ;
bool flush_success = false ; bool flush_success = false ;
if ( device_is_open ) if ( device_is_open )
{ {
flush_success = ped_device_sync( lp_device ) ; flush_success = ped_device_sync( lp_device ) ;
ped_device_close( lp_device ) ; ped_device_close( lp_device ) ;
// (#83) Wait for udev rules to complete after this
// ped_device_close() to avoid busy /dev/DISK entry when
running
// following file system specific manipulation commands o
n the
// whole disk device in format(), after this
// erase_filesystem_signatures().
settle_device(SETTLE_DEVICE_APPLY_MAX_WAIT_SECONDS);
} }
od.get_last_child().set_success_and_capture_errors( flush_success ); od.get_last_child().set_success_and_capture_errors( flush_success );
overall_success &= flush_success ; overall_success &= flush_success ;
} }
destroy_device_and_disk( lp_device, lp_disk ) ; destroy_device_and_disk( lp_device, lp_disk ) ;
operationdetail.get_last_child().set_success_and_capture_errors( overall_ success ); operationdetail.get_last_child().set_success_and_capture_errors( overall_ success );
return overall_success ; return overall_success ;
} }
 End of changes. 2 change blocks. 
6 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)