[gparted] Remove little used HAVE_LIBPARTED_3_0_0_PLUS definition (#734718)



commit 288c4dbf2e345c9e845b7b4e95120cda032a5fc6
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Tue Aug 5 18:16:29 2014 +0100

    Remove little used HAVE_LIBPARTED_3_0_0_PLUS definition (#734718)
    
        Remove HAVE_LIBPARTED_3_0_0_PLUS definition
    
    The #define only controls whether fat16 and fat32 file systems are moved
    by libparted (for versions <= 2.4) or the GParted internal algorithm
    (for libparted versions >= 3.0).  See this commit for more details:
        0fda1d011d79c2e0e4d884e03947f2e4e8cec986
        Enable new fs resize library available with parted-3.1 (#668281)
    
    As nearly all other file system are moved using the GParted internal
    algorithm, just always use it to move fat16 and fat32 file systems too.
    
    Bug #734718 - Update Autoconf version specific libparted checks and
                  defines to feature specific ones

 configure.ac        |    3 +--
 src/GParted_Core.cc |   19 -------------------
 src/fat16.cc        |    5 -----
 3 files changed, 1 insertions(+), 26 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8a58196..eb6ab59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -187,8 +187,7 @@ int main ()
 }
                ]]
        )],
-       [AC_DEFINE([HAVE_LIBPARTED_3_0_0_PLUS], [1], [Define to 1 if libparted >= 3.0])
-        have_old_lp_fs_resize_api=no
+       [have_old_lp_fs_resize_api=no
         AC_MSG_RESULT([yes])
        ],
        [have_old_lp_fs_resize_api=yes
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index b8b5d89..1e5d208 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -1464,10 +1464,6 @@ void GParted_Core::read_label( Partition & partition )
                                if ( p_filesystem )
                                        p_filesystem ->read_label( partition ) ;
                                break ;
-#ifndef HAVE_LIBPARTED_3_0_0_PLUS
-                       case FS::LIBPARTED:
-                               break ;
-#endif
 
                        default:
                                break ;
@@ -1987,10 +1983,8 @@ bool GParted_Core::create_filesystem( const Partition & partition, OperationDeta
                        break ;
                case GParted::FS::GPARTED:
                        break ;
-#ifndef HAVE_LIBPARTED_3_0_PLUS
                case GParted::FS::LIBPARTED:
                        break ;
-#endif
                case GParted::FS::EXTERNAL:
                        succes = ( p_filesystem = get_filesystem_object( partition .filesystem ) ) &&
                                 p_filesystem ->create( partition, operationdetail .get_last_child() ) ;
@@ -2109,10 +2103,6 @@ bool GParted_Core::label_partition( const Partition & partition, OperationDetail
                                succes = ( p_filesystem = get_filesystem_object( partition .filesystem ) ) &&
                                         p_filesystem ->write_label( partition, operationdetail 
.get_last_child() ) ;
                                break ;
-#ifndef HAVE_LIBPARTED_3_0_0_PLUS
-                       case FS::LIBPARTED:
-                               break ;
-#endif
 
                        default:
                                break ;
@@ -2337,13 +2327,8 @@ bool GParted_Core::move_filesystem( const Partition & partition_old,
                                                          total_done, true ) ;
 
                        break ;
-#ifdef HAVE_LIBPARTED_FS_RESIZE
                case GParted::FS::LIBPARTED:
-                       succes = resize_move_filesystem_using_libparted( partition_old,
-                                                                        partition_new,
-                                                                        operationdetail .get_last_child() ) ;
                        break ;
-#endif
                case GParted::FS::EXTERNAL:
                        succes = ( p_filesystem = get_filesystem_object( partition_new .filesystem ) ) &&
                                 p_filesystem ->move( partition_old
@@ -2769,11 +2754,9 @@ bool GParted_Core::copy( const Partition & partition_src,
                                                                          true ) ;
                                                break ;
 
-#ifndef HAVE_LIBPARTED_3_0_0_PLUS
                                case GParted::FS::LIBPARTED :
                                                //FIXME: see if copying through libparted has any advantages
                                                break ;
-#endif
 
                                case GParted::FS::EXTERNAL :
                                        succes = ( p_filesystem = get_filesystem_object( partition_dst 
.filesystem ) ) &&
@@ -3001,10 +2984,8 @@ bool GParted_Core::check_repair_filesystem( const Partition & partition, Operati
                        break ;
                case GParted::FS::GPARTED:
                        break ;
-#ifndef HAVE_LIBPARTED_3_0_0_PLUS
                case GParted::FS::LIBPARTED:
                        break ;
-#endif
                case GParted::FS::EXTERNAL:
                        succes = ( p_filesystem = get_filesystem_object( partition .filesystem ) ) &&
                                 p_filesystem ->check_repair( partition, operationdetail .get_last_child() ) ;
diff --git a/src/fat16.cc b/src/fat16.cc
index d8527f6..772658c 100644
--- a/src/fat16.cc
+++ b/src/fat16.cc
@@ -108,12 +108,7 @@ FS fat16::get_filesystem_support()
        fs .grow = GParted::FS::LIBPARTED ;
        fs .shrink = GParted::FS::LIBPARTED ;
 #endif
-#ifdef HAVE_LIBPARTED_3_0_0_PLUS
        fs .move = FS::GPARTED ;
-#else
-       fs .move = GParted::FS::LIBPARTED ;
-#endif
-
        fs .copy = GParted::FS::GPARTED ;
        fs .online_read = FS::GPARTED ;
 


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