/* Get the information of the specified flash area */
int32_t hal_flash_info_get(hal_partition_t in_partition, hal_logic_partition_t *partition)
/* Get the information of the specified flash area */
int32_t hal_flash_info_get(hal_partition_t in_partition, hal_logic_partition_t *partition)
{
    int32_t ret = -1;
    hal_logic_partition_t *logic_partition;
    hal_partition_t partition_id = 0;
    if ((partition != NULL) && (in_partition < hal_partitions_amount)) {
        ENTER_FUNCTION();
        partition_id = bes_get_operate_partition(in_partition);
        if (partition_id < 0) {
            TRACE("bes_get_operate_partition fail\n");
        }
        else {
            logic_partition = (hal_logic_partition_t *)&hal_partitions[partition_id];
            memcpy(partition, logic_partition, sizeof(hal_logic_partition_t));
            ret = 0;
        }
        LEAVE_FUNCTION();
    }
	return ret;
}