[parted-devel] [PATCH 4/4] libparted: ped_disk_clobber_exclude: remove now-unused function

Jim Meyering jim at meyering.net
Thu Nov 26 14:57:58 UTC 2009


From: Jim Meyering <meyering at redhat.com>

I see no utility in ped_disk_clobber_exclude (just a thin wrapper
around ped_disk_clobber), so am removing the interface.
* include/parted/disk.h (ped_disk_clobber_exclude): Remove prototype.
* libparted/disk.c (ped_disk_clobber_exclude): Remove function.
Now that all callers use NULL as 2nd argument, replace each call
with one to ped_disk_clobber.
* scripts/data/abi/baseline_symbols.txt: Remove it.
---
 include/parted/disk.h                 |    2 --
 libparted/disk.c                      |   18 ++----------------
 scripts/data/abi/baseline_symbols.txt |    1 -
 3 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/include/parted/disk.h b/include/parted/disk.h
index 434f0d3..3f383e2 100644
--- a/include/parted/disk.h
+++ b/include/parted/disk.h
@@ -246,8 +246,6 @@ extern int ped_disk_type_check_feature (const PedDiskType* disk_type,

 extern PedDiskType* ped_disk_probe (PedDevice* dev);
 extern int ped_disk_clobber (PedDevice* dev);
-extern int ped_disk_clobber_exclude (PedDevice* dev,
-                                     const PedDiskType* exclude);
 extern PedDisk* ped_disk_new (PedDevice* dev);
 extern PedDisk* ped_disk_new_fresh (PedDevice* dev,
                                     const PedDiskType* disk_type);
diff --git a/libparted/disk.c b/libparted/disk.c
index 3127e03..89476a7 100644
--- a/libparted/disk.c
+++ b/libparted/disk.c
@@ -293,14 +293,13 @@ find_disk_type (char const *name)

 /**
  * Remove all identifying signatures of a partition table,
- * except for partition tables of a given type.
  *
  * \return 0 on error, 1 otherwise.
  *
  * \sa ped_disk_clobber()
  */
 int
-ped_disk_clobber_exclude (PedDevice* dev, const PedDiskType* exclude)
+ped_disk_clobber (PedDevice* dev)
 {
 	PED_ASSERT (dev != NULL, goto error);

@@ -349,19 +348,6 @@ error:
 }

 /**
- * Remove all identifying signatures of a partition table,
- *
- * \return 0 on error, 1 otherwise.
- *
- * \sa ped_disk_clobber_exclude()
- */
-int
-ped_disk_clobber (PedDevice* dev)
-{
-	return ped_disk_clobber_exclude (dev, NULL);
-}
-
-/**
  * Create a new partition table on \p dev.
  *
  * This new partition table is only created in-memory, and nothing is written
@@ -496,7 +482,7 @@ ped_disk_commit_to_dev (PedDisk* disk)
 		goto error;

 	if (disk->needs_clobber) {
-		if (!ped_disk_clobber_exclude (disk->dev, NULL))
+		if (!ped_disk_clobber (disk->dev))
 			goto error_close_dev;
 		disk->needs_clobber = 0;
 	}
diff --git a/scripts/data/abi/baseline_symbols.txt b/scripts/data/abi/baseline_symbols.txt
index e375512..010a55e 100644
--- a/scripts/data/abi/baseline_symbols.txt
+++ b/scripts/data/abi/baseline_symbols.txt
@@ -256,7 +256,6 @@ FUNC:ped_disk_bsd_done
 FUNC:ped_disk_bsd_init
 FUNC:ped_disk_check
 FUNC:ped_disk_clobber
-FUNC:ped_disk_clobber_exclude
 FUNC:ped_disk_commit
 FUNC:ped_disk_commit_to_dev
 FUNC:ped_disk_commit_to_os
-- 
1.6.6.rc0.54.gb073b




More information about the parted-devel mailing list