[PATCH v3] sim: cfi: new flash device simulation

Mike Frysinger vapier@gentoo.org
Fri Mar 25 21:23:00 GMT 2011


On Fri, Mar 25, 2011 at 3:29 PM, Frank Ch. Eigler wrote:
> On Fri, Mar 25, 2011 at 03:19:28PM -0400, Mike Frysinger wrote:
>> [...]
>> > Woudln't you want to write(2) out the contents of the flash backing
>> > store file, if !HAVE_MMAP?
>>
>> perhaps, but that'd require quite a bit more logic that just a single
>> call to write() here.  frankly, i dont care about the systems that
>> dont support mmap as required by POSIX.  the ifdef's are only to keep
>> from breaking their builds. [...]
>
> I see.  If you don't want to implement write() or fwrite() in a
> symmetric way to the read path, you could make sure that a !HAVE_MMAP
> machine would reject the configuration of a cfi model in "rw"
> file-backed mode.

i'll have it issue a warning that the rw mode is not supported, but
otherwise it'll continue to work
-mike



More information about the Gdb-patches mailing list