diff options
Diffstat (limited to 'testsuites/fstests/support/ramdisk_support.c')
-rw-r--r-- | testsuites/fstests/support/ramdisk_support.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/testsuites/fstests/support/ramdisk_support.c b/testsuites/fstests/support/ramdisk_support.c index d7574b2853..0a07495c02 100644 --- a/testsuites/fstests/support/ramdisk_support.c +++ b/testsuites/fstests/support/ramdisk_support.c @@ -11,12 +11,9 @@ #include "config.h" #endif -#include <sys/stat.h> -#include <fcntl.h> +#include <unistd.h> #include <rtems/ramdisk.h> -#include <rtems/blkdev.h> -#include <rtems/libio.h> #include "ramdisk_support.h" #include "fstest.h" @@ -26,17 +23,14 @@ * Ramdisk information */ -dev_t dev = 0; - void init_ramdisk (void) { int rc = 0; - rc = rtems_disk_io_initialize (); - rtems_test_assert (rc == 0); + rc = ramdisk_register (RAMDISK_BLOCK_SIZE, RAMDISK_BLOCK_COUNT, - false, RAMDISK_PATH, &dev); + false, RAMDISK_PATH); rtems_test_assert (rc == 0); } @@ -45,20 +39,7 @@ del_ramdisk (void) { int rc = 0; - rtems_device_major_number major = 0; - rtems_device_minor_number minor = 0; - rc = rtems_disk_delete (dev); + rc = unlink (RAMDISK_PATH); rtems_test_assert (rc == 0); - - rtems_filesystem_split_dev_t (dev, major, minor); - - rtems_test_assert (major >= 0); - rtems_test_assert (minor >= 0); - - rc = rtems_io_unregister_driver (major); - rtems_test_assert (rc == 0); - rc = rtems_disk_io_done (); - rtems_test_assert (rc == 0); - } |