Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 9da2bc74f3d9322820c0f998a73755cd > files > 1

partitionmanager-1.0.60-0.1236311.3.mga3.src.rpm

--- src/plugins/libparted/libpartedbackend.cpp.parted	2011-06-15 06:13:45.000000000 +0200
+++ src/plugins/libparted/libpartedbackend.cpp	2011-06-15 06:15:03.000000000 +0200
@@ -197,25 +197,8 @@
 
 	qint64 rval = -1;
 
-	PedPartition* pedPartition = ped_disk_get_partition_by_sector(pedDisk, p.firstSector());
-
-	if (pedPartition)
-	{
-		PedFileSystem* pedFileSystem = ped_file_system_open(&pedPartition->geom);
-
-		if (pedFileSystem)
-		{
-			if (PedConstraint* pedConstraint = ped_file_system_get_resize_constraint(pedFileSystem))
-			{
-				rval = pedConstraint->min_size;
-				ped_constraint_destroy(pedConstraint);
-			}
-
-			ped_file_system_close(pedFileSystem);
-		}
-	}
-
 	return rval;
+
 }
 
 /** Reads the sectors used in a FileSystem and stores the result in the Partition's FileSystem object.
--- src/plugins/libparted/libpartedpartitiontable.cpp.parted	2011-06-15 06:15:24.000000000 +0200
+++ src/plugins/libparted/libpartedpartitiontable.cpp	2011-06-15 06:17:03.000000000 +0200
@@ -262,26 +262,7 @@
 
 	if (PedPartition* pedPartition = ped_disk_get_partition_by_sector(pedDisk(), partition.firstSector()))
 	{
-		if (ped_file_system_clobber(&pedPartition->geom))
-		{
-			if (pedPartition->type == PED_PARTITION_NORMAL || pedPartition->type == PED_PARTITION_LOGICAL)
-			{
-				if (ped_device_open(pedDevice()))
-				{
-					// libparted doesn't deal with reiser4, so we overwrite it ourselves here
-					rval = ped_geometry_write(&pedPartition->geom, "0000000", 128, 1);
-
-					if (!rval)
-						report.line() << i18nc("@info/plain", "Failed to erase reiser4 signature on partition <filename>%1</filename>.", partition.deviceNode());
-
-					ped_device_close(pedDevice());
-				}
-			}
-			else
-				rval = true;
-		}
-		else
-			report.line() << i18nc("@info/plain", "Failed to clobber file system on partition <filename>%1</filename>.", partition.deviceNode());
+		report.line() << i18nc("@info/plain", "Failed to clobber file system on partition <filename>%1</filename>.", partition.deviceNode());
 	}
 	else
 		report.line() << i18nc("@info/plain", "Could not delete file system on partition <filename>%1</filename>: Failed to get partition.", partition.deviceNode());
@@ -300,24 +281,7 @@
 
 	if (PedGeometry* originalGeometry = ped_geometry_new(pedDevice(), partition.fileSystem().firstSector(), partition.fileSystem().length()))
 	{
-		if (PedFileSystem* pedFileSystem = ped_file_system_open(originalGeometry))
-		{
-			if (PedGeometry* resizedGeometry = ped_geometry_new(pedDevice(), partition.fileSystem().firstSector(), newLength))
-			{
- 				PedTimer* pedTimer = ped_timer_new(pedTimerHandler, NULL);
-				rval = ped_file_system_resize(pedFileSystem, resizedGeometry, pedTimer);
- 				ped_timer_destroy(pedTimer);
-
-				if (!rval)
-					report.line() << i18nc("@info/plain", "Could not resize file system on partition <filename>%1</filename>.", partition.deviceNode());
-			}
-			else
-				report.line() << i18nc("@info/plain", "Could not get geometry for resized partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
-
-			ped_file_system_close(pedFileSystem);
-		}
-		else
-			report.line() << i18nc("@info/plain", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
+		report.line() << i18nc("@info/plain", "Could not open partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());
 	}
 	else
 		report.line() << i18nc("@info/plain", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition.deviceNode());