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.
This commit is contained in:
Joel Sherrill
2010-03-12 16:35:13 +00:00
parent 8c5358013e
commit 00d170342a
2 changed files with 56 additions and 9 deletions

View File

@@ -1,3 +1,13 @@
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,

View File

@@ -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;
@@ -483,6 +485,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;
}