libblock: Remove const qualifier from bdbuf API

This allows addtion of per disk statistics for example.
This commit is contained in:
Sebastian Huber
2012-05-30 12:43:56 +02:00
parent b6911069d4
commit 40284de844
20 changed files with 46 additions and 46 deletions

View File

@@ -48,7 +48,7 @@ static void test_block_io_control_api(dev_t dev, ramdisk *rd)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
const rtems_disk_device *fd_dd = NULL;
rtems_disk_device *fd_dd = NULL;
int fd = -1;
int rv = -1;
uint32_t value = 0;

View File

@@ -52,9 +52,9 @@ static rtems_task Init(rtems_task_argument argument);
#define BLOCK_COUNT_B 1
static const rtems_disk_device *dd_a;
static rtems_disk_device *dd_a;
static const rtems_disk_device *dd_b;
static rtems_disk_device *dd_b;
static volatile bool sync_done = false;

View File

@@ -48,7 +48,7 @@ static rtems_task Init(rtems_task_argument argument);
#define BLOCK_COUNT 2
static const rtems_disk_device *dd;
static rtems_disk_device *dd;
static volatile bool sync_done = false;

View File

@@ -48,7 +48,7 @@ static rtems_task Init(rtems_task_argument argument);
#define BLOCK_COUNT 1
static const rtems_disk_device *dd;
static rtems_disk_device *dd;
static rtems_id task_id_low;

View File

@@ -60,9 +60,9 @@ static rtems_task Init(rtems_task_argument argument);
/* In case of trouble change this to 1 or 2 for more output */
static unsigned output_level = 0;
static const rtems_disk_device *dd_a;
static rtems_disk_device *dd_a;
static const rtems_disk_device *dd_b;
static rtems_disk_device *dd_b;
static rtems_id task_id_init;
@@ -393,7 +393,7 @@ static int disk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
static void disk_register(
uint32_t block_size,
rtems_blkdev_bnum block_count,
const rtems_disk_device **dd_ptr
rtems_disk_device **dd_ptr
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;

View File

@@ -108,7 +108,7 @@ typedef struct bdbuf_task_control
rtems_device_major_number major;
rtems_device_minor_number minor;
bool passed;
const rtems_disk_device *dd;
rtems_disk_device *dd;
} bdbuf_task_control;
#define BDBUF_TEST_TASKS (3)
@@ -345,7 +345,7 @@ bdbuf_task_control_init (int task,
bdbuf_task_control* tc,
rtems_id master,
rtems_device_major_number major,
const rtems_disk_device *dd)
rtems_disk_device *dd)
{
char name[6];
sprintf (name, "bdt%d", task);
@@ -614,8 +614,8 @@ static rtems_driver_address_table bdbuf_disk_io_ops = {
*/
static bool
bdbuf_tests_setup_disk (rtems_device_major_number* major,
const rtems_disk_device **dd_ptr)
bdbuf_tests_setup_disk (rtems_device_major_number *major,
rtems_disk_device **dd_ptr)
{
rtems_status_code sc;
bool ok;
@@ -1765,7 +1765,7 @@ bdbuf_tester (void)
rtems_task_priority old_priority;
int t;
bool passed = true;
const rtems_disk_device *dd;
rtems_disk_device *dd;
/*
* Change priority to a lower one.

View File

@@ -47,7 +47,7 @@ struct bdbuf_test_descr {
#define TEST_SEM_ATTRIBS RTEMS_DEFAULT_ATTRIBUTES
/** Device ID used for testing */
const rtems_disk_device *test_dd = NULL;
rtems_disk_device *test_dd = NULL;
/** Test result variable */
bool good_test_result = true;

View File

@@ -150,7 +150,7 @@ typedef struct test_ctx {
extern test_ctx g_test_ctx;
/** Device ID used for testing */
extern const rtems_disk_device *test_dd;
extern rtems_disk_device *test_dd;
/**
* Create a message queue for test driver that is used for

View File

@@ -143,7 +143,7 @@ static rtems_status_code disk_register(
}
static void check_read(
const rtems_disk_device *dd,
rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_status_code expected_sc
)

View File

@@ -55,7 +55,7 @@ typedef rtems_bdbuf_buffer *(*access_func)(char task);
typedef void (*release_func)(char task, rtems_bdbuf_buffer *bd);
static const rtems_disk_device *dd;
static rtems_disk_device *dd;
static rtems_id task_id_init;

View File

@@ -157,7 +157,7 @@ static void test_blkdev_imfs_parameters(void)
int rv;
ramdisk *rd;
int fd;
const rtems_disk_device *dd;
rtems_disk_device *dd;
struct stat st;
rd = ramdisk_allocate(NULL, BLOCK_SIZE, BLOCK_COUNT, false);