[PATCH 1/5] imfs: Fix IMFS_stat_file()
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Sep 16 12:23:19 UTC 2016
Use the adjusted and not the requested memfile bytes per block.
Untangle dependencies.
---
cpukit/libfs/src/imfs/imfs_initsupp.c | 5 -----
cpukit/libfs/src/imfs/imfs_stat_file.c | 4 +++-
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c
index 5528e18..8301831 100644
--- a/cpukit/libfs/src/imfs/imfs_initsupp.c
+++ b/cpukit/libfs/src/imfs/imfs_initsupp.c
@@ -25,11 +25,6 @@
#include <string.h>
#include <unistd.h>
-/*
- * IMFS_determine_bytes_per_block
- */
-int imfs_memfile_bytes_per_block = 0;
-
static int IMFS_determine_bytes_per_block(
int *dest_bytes_per_block,
int requested_bytes_per_block,
diff --git a/cpukit/libfs/src/imfs/imfs_stat_file.c b/cpukit/libfs/src/imfs/imfs_stat_file.c
index 2302705..9377b25 100644
--- a/cpukit/libfs/src/imfs/imfs_stat_file.c
+++ b/cpukit/libfs/src/imfs/imfs_stat_file.c
@@ -19,6 +19,8 @@
#include "imfs.h"
+int imfs_memfile_bytes_per_block;
+
int IMFS_stat_file(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
@@ -27,7 +29,7 @@ int IMFS_stat_file(
const IMFS_file_t *file = loc->node_access;
buf->st_size = file->File.size;
- buf->st_blksize = imfs_rq_memfile_bytes_per_block;
+ buf->st_blksize = imfs_memfile_bytes_per_block;
return IMFS_stat( loc, buf );
}
--
1.8.4.5
More information about the devel
mailing list