[gparted] Capture libparted messages when invalid partition table found #337244



commit 0fba953cd918a6e5c9ac100027f53446023de573
Author: Curtis Gedak <gedakc gmail com>
Date:   Thu Dec 3 15:59:49 2009 -0700

    Capture libparted messages when invalid partition table found #337244
    
    When libparted reports a problem with the partition table, capture
    this message and attach it to the "unallocated" partition that spans
    the entire disk.
    
    Examples of these types of problems encountered are:
         /dev/sda: unrecognised disk label
         Can't have overlapping partitions.

 src/GParted_Core.cc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 8c9ed63..c48d084 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -321,6 +321,11 @@ void GParted_Core::set_devices( std::vector<Device> & devices )
 								 0,
 								 temp_device .length,
 								 false );
+				//Place libparted messages in this unallocated partition
+				partition_temp .messages .insert( partition_temp .messages .end(),
+								  libparted_messages. begin(),
+								  libparted_messages .end() ) ;
+				libparted_messages .clear() ;
 				temp_device .partitions .push_back( partition_temp );
 			}
 					



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]