[PATCH] CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK was undocumented and not error checked

Nick Withers nick.withers at anu.edu.au
Tue Oct 20 23:13:38 UTC 2015


On Tue, 2015-10-20 at 17:53 -0500, Joel Sherrill wrote:
> Thank you.
> 
> I have made these changes. Did the explanation make enough sense
> where you would know what it did? :)

Sure! I'm not clear on how the maximum file size is determined, but
since you've enumerated them all I don't really need to know :-)

> On 10/20/2015 5:41 PM, Nick Withers wrote:
> > A couple of doco typos...
> > 
> > On Tue, 2015-10-20 at 14:47 -0500, Joel Sherrill wrote:
> > > closes #2431.
> > > ---
> > >   cpukit/sapi/include/confdefs.h       |   14 ++++++++
> > >   doc/user/conf.t                      |   55
> > > ++++++++++++++++++++++++++++++++++
> > >   testsuites/psxtests/psximfs02/init.c |    4 +-
> > >   3 files changed, 71 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/cpukit/sapi/include/confdefs.h
> > > b/cpukit/sapi/include/confdefs.h
> > > index 66c8c7e..db2bedd 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 */
> > > diff --git a/doc/user/conf.t b/doc/user/conf.t
> > > index ec9b1f8..9905454 100644
> > > --- a/doc/user/conf.t
> > > +++ b/doc/user/conf.t
> > > @@ -2749,6 +2749,61 @@ options will be defined as well
> > >   @end itemize
> > > 
> > >   @c
> > > + at c === CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK ===
> > > + at c
> > > + at subsection Specify Block Size for IMFS
> > > +
> > > + at findex CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
> > > +
> > > + at table @b
> > > + at item CONSTANT:
> > > + at code{CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK}
> > > +
> > > + at item DATA TYPE:
> > > +Boolean feature macro.
> > > +
> > > + at item RANGE:
> > > +Valid values for this configuration parameter are are a power of
> > > two (2)
> > 
> > There's a double "are" there.
> > 
> > > +between 16 and 512 inclusively.  In other words, valid values
> > > are 16,
> > > +32, 64, 128, 257,and 512.
> > 
> > "257,and" -> "256 and". Since I'm here, I'd say "inclusive" rather
> > than
> > "inclusively" too, but maybe that's just me.
> > 
> > Cheers!
> > 
> 



More information about the devel mailing list