summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-04 10:38:48 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-07 07:17:19 +0200
commit0b038bd48b77a650fdc1a74add55523b524b8dac (patch)
treea8cb79964c10c7e76f7cfb63f77cb18a48e46c32 /cpukit/libblock
parentfileio: Avoid deprecated rtems_disk_obtain() (diff)
downloadrtems-0b038bd48b77a650fdc1a74add55523b524b8dac.tar.bz2
libblock: Add RTEMS_DEPRECATED
Close #3358.
Diffstat (limited to 'cpukit/libblock')
-rw-r--r--cpukit/libblock/src/blkdev-imfs.c13
-rw-r--r--cpukit/libblock/src/blkdev-ops.c2
-rw-r--r--cpukit/libblock/src/blkdev.c2
-rw-r--r--cpukit/libblock/src/diskdevs.c2
4 files changed, 15 insertions, 4 deletions
diff --git a/cpukit/libblock/src/blkdev-imfs.c b/cpukit/libblock/src/blkdev-imfs.c
index a46babb593..881236e167 100644
--- a/cpukit/libblock/src/blkdev-imfs.c
+++ b/cpukit/libblock/src/blkdev-imfs.c
@@ -181,14 +181,19 @@ static int rtems_blkdev_imfs_fstat(
struct stat *buf
)
{
- rtems_blkdev_imfs_context *ctx =
- IMFS_generic_get_context_by_location(loc);
- rtems_disk_device *dd = &ctx->dd;
+ rtems_blkdev_imfs_context *ctx;
+ rtems_disk_device *dd;
+ IMFS_jnode_t *node;
+
+ ctx = IMFS_generic_get_context_by_location(loc);
+ dd = &ctx->dd;
- buf->st_rdev = rtems_disk_get_device_identifier(dd);
buf->st_blksize = rtems_disk_get_block_size(dd);
buf->st_blocks = rtems_disk_get_block_count(dd);
+ node = loc->node_access;
+ buf->st_rdev = IMFS_generic_get_device_identifier_by_node(node);
+
return IMFS_stat(loc, buf);
}
diff --git a/cpukit/libblock/src/blkdev-ops.c b/cpukit/libblock/src/blkdev-ops.c
index bf3411daf2..a25857ed4f 100644
--- a/cpukit/libblock/src/blkdev-ops.c
+++ b/cpukit/libblock/src/blkdev-ops.c
@@ -22,6 +22,8 @@
#include <rtems/blkdev.h>
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
const rtems_driver_address_table rtems_blkdev_generic_ops = {
.initialization_entry = NULL,
.open_entry = rtems_blkdev_generic_open,
diff --git a/cpukit/libblock/src/blkdev.c b/cpukit/libblock/src/blkdev.c
index 0d1d9104e6..5f17b9b4d7 100644
--- a/cpukit/libblock/src/blkdev.c
+++ b/cpukit/libblock/src/blkdev.c
@@ -24,6 +24,8 @@
#include "rtems/diskdevs.h"
#include "rtems/bdbuf.h"
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
/* rtems_blkdev_generic_read --
* Generic block device read primitive. Implemented using block device
* buffer management primitives.
diff --git a/cpukit/libblock/src/diskdevs.c b/cpukit/libblock/src/diskdevs.c
index 836cc4973e..b735460e58 100644
--- a/cpukit/libblock/src/diskdevs.c
+++ b/cpukit/libblock/src/diskdevs.c
@@ -28,6 +28,8 @@
#include <rtems/bdbuf.h>
#include <rtems/thread.h>
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
#define DISKTAB_INITIAL_SIZE 8
/* Table of disk devices having the same major number */