From 91e5a0960eb57b9b877d47e070a0578de4a313bf Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Thu, 4 Aug 2016 16:01:25 +0100 Subject: [PATCH] Remove remaining use of retired vol_id Vol_id has been retired and removed from all supported distributions. See earlier commit "Remove use of retired vol_id from FS_Info module (#767842)" for more details. Therefore remove it's use from GParted entirely. --- README | 1 - include/hfs.h | 1 - include/hfsplus.h | 1 - src/hfs.cc | 24 ------------------------ src/hfsplus.cc | 24 ------------------------ 5 files changed, 51 deletions(-) diff --git a/README b/README index 7afbadb3..c0f1a370 100644 --- a/README +++ b/README @@ -255,7 +255,6 @@ system. These commands include: blkid - [mandatory requirement] used to detect file systems libparted doesn't, read UUIDs and volume labels hdparm - used to query disk device serial numbers - vol_id - used to read volume labels udisks - used to prevent automounting of file systems devkit-disks - used to prevent automounting of file systems {filemanager} - used in attempt data rescue to display discovered diff --git a/include/hfs.h b/include/hfs.h index bd219e54..673e138c 100644 --- a/include/hfs.h +++ b/include/hfs.h @@ -29,7 +29,6 @@ class hfs : public FileSystem { public: FS get_filesystem_support() ; - void read_label( Partition & partition ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; }; diff --git a/include/hfsplus.h b/include/hfsplus.h index d1a08377..42280d89 100644 --- a/include/hfsplus.h +++ b/include/hfsplus.h @@ -29,7 +29,6 @@ class hfsplus : public FileSystem { public: FS get_filesystem_support() ; - void read_label( Partition & partition ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; }; diff --git a/src/hfs.cc b/src/hfs.cc index 13b32349..50237494 100644 --- a/src/hfs.cc +++ b/src/hfs.cc @@ -42,9 +42,6 @@ FS hfs::get_filesystem_support() if ( ! Glib::find_program_in_path( "hfsck" ) .empty() ) fs .check = FS::EXTERNAL ; - if ( ! Glib::find_program_in_path( "vol_id" ) .empty() ) - fs .read_label = FS::EXTERNAL ; - fs .copy = GParted::FS::GPARTED ; fs .move = GParted::FS::GPARTED ; fs .online_read = FS::GPARTED ; @@ -54,27 +51,6 @@ FS hfs::get_filesystem_support() return fs ; } -void hfs::read_label( Partition & partition ) -{ - if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) ) - { - Glib::ustring label = Utils::regexp_label( output, "ID_FS_LABEL=([^\n]*)" ) ; - //FIXME: find a better way to see if label is empty.. imagine someone uses 'untitled' as label.... ;) - if ( label != "untitled" ) - partition.set_filesystem_label( label ); - else - partition.set_filesystem_label( "" ); - } - else - { - if ( ! output .empty() ) - partition.push_back_message( output ); - - if ( ! error .empty() ) - partition.push_back_message( error ); - } -} - bool hfs::create( const Partition & new_partition, OperationDetail & operationdetail ) { Glib::ustring cmd = ""; diff --git a/src/hfsplus.cc b/src/hfsplus.cc index 76fccd73..1e690fa8 100644 --- a/src/hfsplus.cc +++ b/src/hfsplus.cc @@ -42,9 +42,6 @@ FS hfsplus::get_filesystem_support() if ( ! Glib::find_program_in_path( "fsck.hfsplus" ) .empty() ) fs .check = FS::EXTERNAL ; - if ( ! Glib::find_program_in_path( "vol_id" ) .empty() ) - fs .read_label = FS::EXTERNAL ; - fs .copy = GParted::FS::GPARTED ; fs .move = GParted::FS::GPARTED ; fs .online_read = FS::GPARTED ; @@ -52,27 +49,6 @@ FS hfsplus::get_filesystem_support() return fs ; } -void hfsplus::read_label( Partition & partition ) -{ - if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) ) - { - Glib::ustring label = Utils::regexp_label( output, "ID_FS_LABEL=([^\n]*)" ) ; - //FIXME: find a better way to see if label is empty.. imagine someone uses 'untitled' as label.... ;) - if ( label != "untitled" ) - partition.set_filesystem_label( label ); - else - partition.set_filesystem_label( "" ); - } - else - { - if ( ! output .empty() ) - partition.push_back_message( output ); - - if ( ! error .empty() ) - partition.push_back_message( error ); - } -} - bool hfsplus::create( const Partition & new_partition, OperationDetail & operationdetail ) { Glib::ustring cmd = "";