diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 9c73d13b07..46c4be3224 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,13 @@ +2010-03-12 Joel Sherrill + + * 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 * ftpd/ftpd.c, httpd/asp.c, httpd/ejparse.c, httpd/emfdb.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; @@ -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; }