[gparted] Add labelling of linux-swap
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Add labelling of linux-swap
- Date: Sun, 8 Aug 2010 16:38:17 +0000 (UTC)
commit 3194121496fcc3a35b81835ecad55120d036aedf
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Wed Aug 4 22:57:29 2010 +0100
Add labelling of linux-swap
When found, use external swaplabel command to label linux-swap
partitions. (Available from util-linux-ng 2.18 released 30 Jun 2010).
src/linux_swap.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/linux_swap.cc b/src/linux_swap.cc
index 3383b79..a9df279 100644
--- a/src/linux_swap.cc
+++ b/src/linux_swap.cc
@@ -37,6 +37,9 @@ FS linux_swap::get_filesystem_support()
if ( ! Glib::find_program_in_path( "vol_id" ) .empty() )
fs .read_label = FS::EXTERNAL ;
+ if ( ! Glib::find_program_in_path( "swaplabel" ) .empty() )
+ fs .write_label = FS::EXTERNAL ;
+
fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
@@ -65,7 +68,7 @@ void linux_swap::read_label( Partition & partition )
bool linux_swap::write_label( const Partition & partition, OperationDetail & operationdetail )
{
- return true ;
+ return ! execute_command( "swaplabel -L \"" + partition .label + "\" " + partition .get_path(), operationdetail ) ;
}
bool linux_swap::create( const Partition & new_partition, OperationDetail & operationdetail )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]