summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-03-12 16:35:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-03-12 16:35:13 +0000
commit00d170342a531e7a3a2995f1041d1dafff51a10c (patch)
tree5162db150470403c5568d6f86fafd37a831af93a
parent8c5358013e78f9e98f363d1450eaba67fd468180 (diff)
2010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* libblock/src/ide_part_table.c: Functionality of rtems_ide_part_table_get() and rtems_ide_part_table_free() was needed internally but those routines are deprecated from the public API. So move their contents to private static routines. Using the private routines in this file avoids deprecation warnings and leaves functional, although deprecated, versions for potential use by applications.
-rw-r--r--cpukit/ChangeLog10
-rw-r--r--cpukit/libblock/src/ide_part_table.c55
2 files changed, 56 insertions, 9 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 9c73d13b07..46c4be3224 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,15 @@
2010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * libblock/src/ide_part_table.c: Functionality of
+ rtems_ide_part_table_get() and rtems_ide_part_table_free() was needed
+ internally but those routines are deprecated from the public API. So
+ move their contents to private static routines. Using the private
+ routines in this file avoids deprecation warnings and leaves
+ functional, although deprecated, versions for potential use by
+ applications.
+
+2010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* ftpd/ftpd.c, httpd/asp.c, httpd/ejparse.c, httpd/emfdb.c,
httpd/misc.c, httpd/um.c, httpd/webs.c, httpd/websuemf.c,
libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_format.c,
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;
}