diff options
Diffstat (limited to 'testsuites/libtests/block04/init.c')
-rw-r--r-- | testsuites/libtests/block04/init.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/testsuites/libtests/block04/init.c b/testsuites/libtests/block04/init.c index 27b932a63c..ff7b204d2b 100644 --- a/testsuites/libtests/block04/init.c +++ b/testsuites/libtests/block04/init.c @@ -7,12 +7,13 @@ */ /* - * Copyright (c) 2009 - * embedded brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Copyright (c) 2009-2012 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Obere Lagerstr. 30 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -44,7 +45,7 @@ #define BLOCK_COUNT 1 -static dev_t dev; +static const rtems_disk_device *dd; static rtems_id task_id_low; @@ -57,7 +58,7 @@ static void task_low(rtems_task_argument arg) printk("L: try access: 0\n"); - sc = rtems_bdbuf_get(dev, 0, &bd); + sc = rtems_bdbuf_get(dd, 0, &bd); ASSERT_SC(sc); printk("L: access: 0\n"); @@ -83,7 +84,7 @@ static void task_high(rtems_task_argument arg) printk("H: try access: 0\n"); - sc = rtems_bdbuf_get(dev, 0, &bd); + sc = rtems_bdbuf_get(dd, 0, &bd); ASSERT_SC(sc); printk("H: access: 0\n"); @@ -103,6 +104,7 @@ static void task_high(rtems_task_argument arg) static rtems_task Init(rtems_task_argument argument) { rtems_status_code sc = RTEMS_SUCCESSFUL; + dev_t dev = 0; printk("\n\n*** TEST BLOCK 4 ***\n"); @@ -112,6 +114,9 @@ static rtems_task Init(rtems_task_argument argument) sc = ramdisk_register(BLOCK_SIZE, BLOCK_COUNT, false, "/dev/rda", &dev); ASSERT_SC(sc); + dd = rtems_disk_obtain(dev); + rtems_test_assert(dd != NULL); + sc = rtems_task_create( rtems_build_name(' ', 'L', 'O', 'W'), PRIORITY_LOW, |