bug-parted
[Top][All Lists]
Advanced

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

[PATCH 3/3] maint: bump library version to 2.0.0


From: Jim Meyering
Subject: [PATCH 3/3] maint: bump library version to 2.0.0
Date: Fri, 02 Mar 2012 17:08:36 +0100

FYI...

And remove some cruft:

>From 4e6ad5461660c1dc3d97a0d76e7dabea0aebd26f Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 2 Mar 2012 12:29:04 +0100
Subject: [PATCH 1/3] lib-fs-resize: remove unused probe-related code

* libparted/fs/r/hfs/probe.c: Remove probe-related functions.
There are not used.
* libparted/fs/r/fat/fat.c: Likewise.
* libparted/fs/r/hfs/probe.h: ...and declarations.
---
 libparted/fs/r/fat/fat.c   |   58 -------------------
 libparted/fs/r/hfs/probe.c |  132 --------------------------------------------
 libparted/fs/r/hfs/probe.h |    9 ---
 3 files changed, 199 deletions(-)

diff --git a/libparted/fs/r/fat/fat.c b/libparted/fs/r/fat/fat.c
index 0cecc5e..9d43e21 100644
--- a/libparted/fs/r/fat/fat.c
+++ b/libparted/fs/r/fat/fat.c
@@ -108,64 +108,6 @@ fat_set_frag_sectors (PedFileSystem* fs, PedSector 
frag_sectors)
        return 1;
 }

-PedGeometry*
-fat_probe (PedGeometry* geom, FatType* fat_type)
-{
-       PedFileSystem*          fs;
-       FatSpecific*            fs_info;
-       PedGeometry*            result;
-
-       fs = fat_alloc (geom);
-       if (!fs)
-               goto error;
-       fs_info = (FatSpecific*) fs->type_specific;
-
-       if (!fat_boot_sector_read (&fs_info->boot_sector, geom))
-               goto error_free_fs;
-       if (!fat_boot_sector_analyse (&fs_info->boot_sector, fs))
-               goto error_free_fs;
-
-       *fat_type = fs_info->fat_type;
-       result = ped_geometry_new (geom->dev, geom->start,
-                                  fs_info->sector_count);
-
-       fat_free (fs);
-       return result;
-
-error_free_fs:
-       fat_free (fs);
-error:
-       return NULL;
-}
-
-PedGeometry*
-fat_probe_fat16 (PedGeometry* geom)
-{
-       FatType         fat_type;
-       PedGeometry*    probed_geom = fat_probe (geom, &fat_type);
-
-       if (probed_geom) {
-               if (fat_type == FAT_TYPE_FAT16)
-                       return probed_geom;
-               ped_geometry_destroy (probed_geom);
-       }
-       return NULL;
-}
-
-PedGeometry*
-fat_probe_fat32 (PedGeometry* geom)
-{
-       FatType         fat_type;
-       PedGeometry*    probed_geom = fat_probe (geom, &fat_type);
-
-       if (probed_geom) {
-               if (fat_type == FAT_TYPE_FAT32)
-                       return probed_geom;
-               ped_geometry_destroy (probed_geom);
-       }
-       return NULL;
-}
-
 #ifndef DISCOVER_ONLY
 int
 fat_clobber (PedGeometry* geom)
diff --git a/libparted/fs/r/hfs/probe.c b/libparted/fs/r/hfs/probe.c
index cc422b9..376a821 100644
--- a/libparted/fs/r/hfs/probe.c
+++ b/libparted/fs/r/hfs/probe.c
@@ -96,135 +96,3 @@ hfs_and_wrapper_probe (PedGeometry* geom)
        ped_geometry_destroy (geom_ret);
        return NULL;
 }
-
-PedGeometry*
-hfsplus_probe (PedGeometry* geom)
-{
-       PedGeometry*    geom_ret;
-       uint8_t         buf[PED_SECTOR_SIZE_DEFAULT];
-
-       PED_ASSERT (geom != NULL);
-
-       if (!hfsc_can_use_geom (geom))
-               return NULL;
-
-       if ((geom_ret = hfs_and_wrapper_probe(geom))) {
-               /* HFS+ is embedded in an HFS volume ? */
-               HfsMasterDirectoryBlock *mdb;
-               mdb = (HfsMasterDirectoryBlock *) buf;
-
-               if (!ped_geometry_read (geom, buf, 2, 1)
-                   || (mdb->old_new.embedded.signature
-                       != PED_CPU_TO_BE16 (HFSP_SIGNATURE))) {
-                       ped_geometry_destroy (geom_ret);
-                       return NULL;
-               } else
-                       return geom_ret;
-       } else {
-               /* This is a standalone HFS+ volume ? */
-               PedSector       search, max;
-               HfsPVolumeHeader *vh;
-               vh = (HfsPVolumeHeader *) buf;
-
-               if ((geom->length < 5)
-                   || !ped_geometry_read (geom, buf, 2, 1)
-                   || (vh->signature != PED_CPU_TO_BE16 (HFSP_SIGNATURE)))
-                       return NULL;
-
-               /* Correct range is indeed [ blocks*sz-2;(blocs+1)*sz-2 ( */
-               /* But previous versions of my implementation used to */
-               /* assume range is [(blocks-1)*sz-1;(blocks*sz) ( */
-               /* (blocks-1)*sz-1 has to be scanned last, because */
-               /* it can belong to a regular file */
-               max = ((PedSector) PED_BE32_TO_CPU (vh->total_blocks) + 1)
-                     * ( PED_BE32_TO_CPU (vh->block_size) / 
PED_SECTOR_SIZE_DEFAULT )
-                     - 2;
-               search = max - 2 * ( PED_BE32_TO_CPU (vh->block_size)
-                                    / PED_SECTOR_SIZE_DEFAULT ) + 2;
-               if (!(geom_ret = ped_geometry_new (geom->dev, geom->start,
-                                                  search + 2)))
-                       return NULL;
-
-               for (; search < max; search++) {
-                       if (!ped_geometry_set (geom_ret, geom_ret->start,
-                                              search + 2)
-                           || !ped_geometry_read (geom_ret, buf, search, 1))
-                               break;
-                       if (vh->signature == PED_CPU_TO_BE16 (HFSP_SIGNATURE))
-                               return geom_ret;
-               }
-               search = ((PedSector) PED_BE32_TO_CPU (vh->total_blocks) - 1)
-                     * ( PED_BE32_TO_CPU (vh->block_size) / 
PED_SECTOR_SIZE_DEFAULT )
-                     - 1;
-               if (!ped_geometry_set (geom_ret, geom_ret->start,
-                                              search + 2)
-                   || !ped_geometry_read (geom_ret, buf, search, 1)
-                   || vh->signature != PED_CPU_TO_BE16 (HFSP_SIGNATURE)) {
-                       ped_geometry_destroy (geom_ret);
-                       return NULL;
-               } else
-                       return geom_ret;
-       }
-}
-
-PedGeometry*
-hfs_probe (PedGeometry* geom)
-{
-       PedGeometry*    geom_base;
-       PedGeometry*    geom_plus = NULL;
-
-       PED_ASSERT (geom != NULL);
-
-       if (!hfsc_can_use_geom (geom))
-               return NULL;
-
-       if ((geom_base = hfs_and_wrapper_probe(geom))
-           && (!(geom_plus = hfsplus_probe(geom_base))))
-               return geom_base;
-       else {
-               if (geom_base) ped_geometry_destroy (geom_base);
-               if (geom_plus) ped_geometry_destroy (geom_plus);
-               return NULL;
-       }
-}
-
-PedGeometry*
-hfsx_probe (PedGeometry* geom)
-{
-       PedGeometry*    geom_ret;
-       uint8_t         buf[PED_SECTOR_SIZE_DEFAULT];
-       PedSector       search, max;
-       HfsPVolumeHeader *vh = (HfsPVolumeHeader *) buf;
-
-       PED_ASSERT (geom != NULL);
-
-       if (!hfsc_can_use_geom (geom))
-               return NULL;
-
-       if ((geom->length < 5)
-           || !ped_geometry_read (geom, buf, 2, 1)
-           || (vh->signature != PED_CPU_TO_BE16 (HFSX_SIGNATURE)))
-               return NULL;
-
-       /* unlike the hfs+ code, which should be kept compatible
-       with my old previous implementations, we only care here
-       about legal alternate VH positions, like TN1150 describes them */
-       max = ((PedSector) PED_BE32_TO_CPU (vh->total_blocks) + 1)
-                     * ( PED_BE32_TO_CPU (vh->block_size) / 
PED_SECTOR_SIZE_DEFAULT )
-                     - 2;
-       search = max - ( PED_BE32_TO_CPU (vh->block_size) / 
PED_SECTOR_SIZE_DEFAULT );
-       if (!(geom_ret = ped_geometry_new (geom->dev, geom->start,
-                                          search + 2)))
-               return NULL;
-       for (; search < max; search++) {
-               if (!ped_geometry_set (geom_ret, geom_ret->start,
-                                      search + 2)
-                   || !ped_geometry_read (geom_ret, buf, search, 1))
-                       break;
-               if (vh->signature == PED_CPU_TO_BE16 (HFSX_SIGNATURE))
-                       return geom_ret;
-       }
-
-       ped_geometry_destroy (geom_ret);
-       return NULL;
-}
diff --git a/libparted/fs/r/hfs/probe.h b/libparted/fs/r/hfs/probe.h
index 0b4a01f..ba754bb 100644
--- a/libparted/fs/r/hfs/probe.h
+++ b/libparted/fs/r/hfs/probe.h
@@ -31,13 +31,4 @@ hfsc_can_use_geom (PedGeometry* geom);
 PedGeometry*
 hfs_and_wrapper_probe (PedGeometry* geom);

-PedGeometry*
-hfsplus_probe (PedGeometry* geom);
-
-PedGeometry*
-hfs_probe (PedGeometry* geom);
-
-PedGeometry*
-hfsx_probe (PedGeometry* geom);
-
 #endif /* _PROBE_H */
--
1.7.9.2.324.g1221


>From ab9b086119d164ad70b8f8c767f2c758b2aa7ed1 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 2 Mar 2012 14:51:58 +0100
Subject: [PATCH 2/3] maint: update README-release to reflect we now have two
 libraries

* README-release: Two sets of library version triples to adjust.
* bootstrap: Tiny fix from gnulib.
---
 README-release |    5 +++--
 bootstrap      |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/README-release b/README-release
index 2e5266c..286493d 100644
--- a/README-release
+++ b/README-release
@@ -4,8 +4,9 @@ Here are most of the steps we (maintainers) follow when making 
a release.

     git checkout master; git pull

-* Adjust shared-library settings, CURRENT:REVISION:AGE in
-  libparted/Makefile.am, following instructions in the comments there.
+* Adjust shared-library settings, CURRENT:REVISION:AGE in both files,
+  libparted/{fs/,}Makefile.am
+  following the instructions in the comments there.

 * Run ./configure && make maintainer-clean

diff --git a/bootstrap b/bootstrap
index c8ee3cc..31eb651 100755
--- a/bootstrap
+++ b/bootstrap
@@ -423,7 +423,7 @@ check_versions() {
       $use_git || continue
     fi
     # Honor $APP variables ($TAR, $AUTOCONF, etc.)
-    appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
+    appvar=`echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_'`
     test "$appvar" = TAR && appvar=AMTAR
     case $appvar in
         GZIP) ;; # Do not use $GZIP:  it contains gzip options.
--
1.7.9.2.324.g1221


>From 82327a394035770c736eaef188b10c3489e4ae99 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 2 Mar 2012 17:07:03 +0100
Subject: [PATCH 3/3] maint: bump library version to 2.0.0

* libparted/Makefile.am (CURRENT): Increment, since I removed
ped_realloc.
---
 libparted/Makefile.am |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libparted/Makefile.am b/libparted/Makefile.am
index f8fbba5..7cf35b2 100644
--- a/libparted/Makefile.am
+++ b/libparted/Makefile.am
@@ -22,7 +22,7 @@ lib_LTLIBRARIES       = libparted.la
 # Set the shared library version, per Libtool's guidelines.
 # For details, see the "Updating library version information" section of
 # "info libtool".
-CURRENT = 1
+CURRENT = 2
 REVISION = 0
 AGE = 0

--
1.7.9.2.324.g1221



reply via email to

[Prev in Thread] Current Thread [Next in Thread]