From 69be1a222ae173e5cdd5c3cc47eab78e65299c72 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 20 Oct 2015 14:47:10 -0500 Subject: CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK was undocumented and not error checked closes #2431. --- cpukit/sapi/include/confdefs.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cpukit') diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index 47d70268f1..0e83bf1333 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -3823,5 +3823,19 @@ const rtems_libio_helper rtems_fs_init_helper = #endif #endif +/* + * IMFS block size for in memory files (memfiles) must be a power of + * two between 16 and 512 inclusive. + */ +#if ((CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 16) && \ + (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 32) && \ + (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 64) && \ + (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 128) && \ + (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 256) && \ + (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 512)) + #error "IMFS Memfile block size must be a power of 2 between 16 and 512" +#endif + + #endif /* end of include file */ -- cgit v1.2.3