parted/parted-1.9.0-move-function-declarations.patch
Joel Andres Granados Moreno 15289757e3 New version.
2009-07-10 13:16:25 +00:00

167 lines
4.7 KiB
Diff

From cd5dd183b4810de2160c433544541c852ca1877d Mon Sep 17 00:00:00 2001
From: Joel Granados Moreno <jgranado@redhat.com>
Date: Mon, 29 Jun 2009 13:44:10 +0200
Subject: [PATCH] Put the dasd function definitions at the end of the file.
All label types define the label functions at the end of the file. Be
consistent with this characteristic. The function declarations are no
longer needed.
* libparted/labels/dasd.c (dasd_disk_ops, dasd_disk_type)
(ped_disk_dasd_init, ped_disk_dasd_done): Move the specifications of the
functions the end of the file. Remove function declarations.
---
libparted/labels/dasd.c | 125 ++++++++++++++++++-----------------------------
1 files changed, 48 insertions(+), 77 deletions(-)
diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
index 3a0bb32..e3e5d1b 100644
--- a/libparted/labels/dasd.c
+++ b/libparted/labels/dasd.c
@@ -76,70 +76,7 @@ typedef struct {
struct fdasd_anchor *anchor;
} DasdDiskSpecific;
-static int dasd_probe (const PedDevice *dev);
-static int dasd_clobber (PedDevice* dev);
-static int dasd_read (PedDisk* disk);
-static int dasd_write (const PedDisk* disk);
-
-static PedPartition* dasd_partition_new (const PedDisk* disk,
- PedPartitionType part_type,
- const PedFileSystemType* fs_type,
- PedSector start,
- PedSector end);
-static void dasd_partition_destroy (PedPartition* part);
-static int dasd_partition_set_flag (PedPartition* part,
- PedPartitionFlag flag,
- int state);
-static int dasd_partition_get_flag (const PedPartition* part,
- PedPartitionFlag flag);
-static int dasd_partition_is_flag_available (const PedPartition* part,
- PedPartitionFlag flag);
-static int dasd_partition_align (PedPartition* part,
- const PedConstraint* constraint);
-static int dasd_partition_enumerate (PedPartition* part);
-static int dasd_get_max_primary_partition_count (const PedDisk* disk);
-
-static PedDisk* dasd_alloc (const PedDevice* dev);
-static PedDisk* dasd_duplicate (const PedDisk* disk);
-static void dasd_free (PedDisk* disk);
-static int dasd_partition_set_system (PedPartition* part,
- const PedFileSystemType* fs_type);
-static int dasd_alloc_metadata (PedDisk* disk);
-
-static PedDiskOps dasd_disk_ops = {
- probe: dasd_probe,
- clobber: dasd_clobber,
- read: dasd_read,
- write: dasd_write,
-
- alloc: dasd_alloc,
- duplicate: dasd_duplicate,
- free: dasd_free,
- partition_set_system: dasd_partition_set_system,
-
- partition_new: dasd_partition_new,
- partition_destroy: dasd_partition_destroy,
- partition_set_flag: dasd_partition_set_flag,
- partition_get_flag: dasd_partition_get_flag,
- partition_is_flag_available: dasd_partition_is_flag_available,
- partition_set_name: NULL,
- partition_get_name: NULL,
- partition_align: dasd_partition_align,
- partition_enumerate: dasd_partition_enumerate,
-
- alloc_metadata: dasd_alloc_metadata,
- get_max_primary_partition_count: dasd_get_max_primary_partition_count,
- get_max_supported_partition_count: dasd_get_max_supported_partition_count,
-
- partition_duplicate: NULL
-};
-
-static PedDiskType dasd_disk_type = {
- next: NULL,
- name: "dasd",
- ops: &dasd_disk_ops,
- features: 0
-};
+static PedDiskType dasd_disk_type;
static PedDisk*
dasd_alloc (const PedDevice* dev)
@@ -199,19 +136,6 @@ dasd_free (PedDisk* disk)
_ped_disk_free(disk);
}
-
-void
-ped_disk_dasd_init ()
-{
- ped_disk_type_register(&dasd_disk_type);
-}
-
-void
-ped_disk_dasd_done ()
-{
- ped_disk_type_unregister(&dasd_disk_type);
-}
-
static int
dasd_probe (const PedDevice *dev)
{
@@ -881,3 +805,50 @@ error:
ped_constraint_destroy (constraint_any);
return 0;
}
+
+static PedDiskOps dasd_disk_ops = {
+ probe: dasd_probe,
+ clobber: dasd_clobber,
+ read: dasd_read,
+ write: dasd_write,
+
+ alloc: dasd_alloc,
+ duplicate: dasd_duplicate,
+ free: dasd_free,
+ partition_set_system: dasd_partition_set_system,
+
+ partition_new: dasd_partition_new,
+ partition_destroy: dasd_partition_destroy,
+ partition_set_flag: dasd_partition_set_flag,
+ partition_get_flag: dasd_partition_get_flag,
+ partition_is_flag_available: dasd_partition_is_flag_available,
+ partition_set_name: NULL,
+ partition_get_name: NULL,
+ partition_align: dasd_partition_align,
+ partition_enumerate: dasd_partition_enumerate,
+
+ alloc_metadata: dasd_alloc_metadata,
+ get_max_primary_partition_count: dasd_get_max_primary_partition_count,
+ get_max_supported_partition_count: dasd_get_max_supported_partition_count,
+
+ partition_duplicate: NULL
+};
+
+static PedDiskType dasd_disk_type = {
+ next: NULL,
+ name: "dasd",
+ ops: &dasd_disk_ops,
+ features: 0
+};
+
+void
+ped_disk_dasd_init ()
+{
+ ped_disk_type_register(&dasd_disk_type);
+}
+
+void
+ped_disk_dasd_done ()
+{
+ ped_disk_type_unregister(&dasd_disk_type);
+}
--
1.6.0.6