From cb9bb9d13f5bb64634b36281589ae902bd3c0490 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 8115a85724..e29111638a 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -3820,5 +3820,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