[gparted] Skip reading existing partition table before creating a new one (#743181)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Skip reading existing partition table before creating a new one (#743181)
- Date: Mon, 9 Mar 2015 17:11:46 +0000 (UTC)
commit e9a5cf2843000d5d4cff5648e3f79b2a547e17fa
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sun Feb 22 08:47:53 2015 +0000
Skip reading existing partition table before creating a new one (#743181)
Creating a new partition table was getting libparted to read any
existing partition table before creating a new partition table on the
device. This is an unnecessary step, and if the device didn't already
contain a partition table also printed this error from libparted:
/dev/sdb: unrecognised disk label
Since get_device_and_disk() has been split into two, just call
get_device() instead to just populate the PedDevice object representing
the disk device. Removes a small unnecessary step.
Bug 743181 - Add unpartitioned drive read-write support
src/GParted_Core.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 55ea9ce..e4f5584 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -808,7 +808,7 @@ bool GParted_Core::set_disklabel( const Glib::ustring & device_path, const Glib:
PedDevice* lp_device = NULL ;
PedDisk* lp_disk = NULL ;
- if ( get_device_and_disk( device_path, lp_device, lp_disk, false ) )
+ if ( get_device( device_path, lp_device ) )
{
PedDiskType *type = NULL ;
type = ped_disk_type_get( disklabel .c_str() ) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]