summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libblock')
-rw-r--r--cpukit/libblock/src/ide_part_table.c55
1 files changed, 46 insertions, 9 deletions
diff --git a/cpukit/libblock/src/ide_part_table.c b/cpukit/libblock/src/ide_part_table.c
index f9a942c510..3543284dfc 100644
--- a/cpukit/libblock/src/ide_part_table.c
+++ b/cpukit/libblock/src/ide_part_table.c
@@ -426,7 +426,7 @@ partition_free(rtems_part_desc_t *part_desc)
/*
- * rtems_ide_part_table_free - frees disk descriptor structure
+ * partition_table_free - frees disk descriptor structure
*
* PARAMETERS:
* disk_desc - disc descriptor structure to free
@@ -434,12 +434,14 @@ partition_free(rtems_part_desc_t *part_desc)
* RETURNS:
* N/A
*/
-void
-rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
+static void
+partition_table_free(rtems_disk_desc_t *disk_desc)
{
int part_num;
- for (part_num = 0; part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER; part_num++)
+ for (part_num = 0;
+ part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
+ part_num++)
{
partition_free(disk_desc->partitions[part_num]);
}
@@ -449,7 +451,7 @@ rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
/*
- * rtems_ide_part_table_get - reads partition table structure from the device
+ * partition_table_get - reads partition table structure from the device
* and creates disk description structure
*
* PARAMETERS:
@@ -460,8 +462,8 @@ rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
* RTEMS_SUCCESSFUL if success,
* RTEMS_INTERNAL_ERROR otherwise
*/
-rtems_status_code
-rtems_ide_part_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
+static rtems_status_code
+partition_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
{
struct stat dev_stat;
rtems_status_code rc;
@@ -484,6 +486,41 @@ rtems_ide_part_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
/*
+ * rtems_ide_part_table_free - frees disk descriptor structure
+ *
+ * PARAMETERS:
+ * disk_desc - disc descriptor structure to free
+ *
+ * RETURNS:
+ * N/A
+ */
+void
+rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
+{
+ partition_table_free( disk_desc );
+}
+
+
+/*
+ * rtems_ide_part_table_get - reads partition table structure from the device
+ * and creates disk description structure
+ *
+ * PARAMETERS:
+ * dev_name - path to physical device in /dev filesystem
+ * disk_desc - returned disc description structure
+ *
+ * RETURNS:
+ * RTEMS_SUCCESSFUL if success,
+ * RTEMS_INTERNAL_ERROR otherwise
+ */
+rtems_status_code
+rtems_ide_part_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
+{
+ return partition_table_get( dev_name, disk_desc );
+}
+
+
+/*
* rtems_ide_part_table_initialize - initializes logical devices
* on the physical IDE drive
*
@@ -516,7 +553,7 @@ rtems_ide_part_table_initialize(char *dev_name)
}
/* get partition table */
- rc = rtems_ide_part_table_get(dev_name, disk_desc);
+ rc = partition_table_get(dev_name, disk_desc);
if (rc != RTEMS_SUCCESSFUL)
{
free(disk_desc);
@@ -551,7 +588,7 @@ rtems_ide_part_table_initialize(char *dev_name)
}
}
- rtems_ide_part_table_free(disk_desc);
+ partition_table_free(disk_desc);
return RTEMS_SUCCESSFUL;
}