Re: [Yaffs] Some patches for Direct interface compilation

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Stéphane Lesage
Date:  
To: yaffs
Subject: Re: [Yaffs] Some patches for Direct interface compilation
Le 14/06/2012 05:11, Charles Manning a écrit :

>>1. Minor fixes:
>I have incorporated most of these and will check them a bit further.


OK

>>2. string functions macros with yaffs_ prefix


> I moved away from yaffs_strxxx prefixing in the core code because the pkernel
> people did not like it.
> I have changed the way the Yaffs Direct stuff handles the common code. The old
> way used links. The new way uses a script which copies the files and uses sed
> to modify the strxxx functions.
> This also now changes all loff_t to Y_LOFF_T to allow the substitution of
> 32-bit loff_t instead of 64-bit lott_f.
> This script is executed in the direct directory:
> cd yaffs2/direct
> ./handle_common.sh copy


Ok, you are constrained by the kernel.
But embedded world does not necessary have the tools to execute your script (I don't).
In LwIP for example, the user must implement all the necessary stuff in 2 header files
(compiler/platform and options)

Then I suggest another way:

remove all yaffs_ prefixes in the direct FS.
Let the user define/include/declare the functions himself in the yaffscfg.h

Same for lott_f, I just typedef it in yaffscfg.h
(along with mode_t, off_t and dev_t which I don't have)

>>3. Patch for more customization of ydirectenv.h from user defined
>>configuration in yaffscg.h, and remove debug functions
>I will modify this along with some other changes I am making.


OK.
The idea is to have a single point (yaffscfg.h) to port to the user platform:
- to be able to remove useless stuff in embedded environment release (trace/BUG)
- or removing unnecessary function calls. For example:
#define Y_CURRENT_TIME    time()
#define Y_CURRENT_TIME    0


There's more to do here with the duplicated get/set error functions,
which could be defined to errno if available on the platform.

--
Stephane Lesage