mtd-utils: fec.c uses bcopy()

Mike Frysinger vapier.adi at gmail.com
Tue Oct 7 22:38:52 EDT 2008


On Tue, Oct 7, 2008 at 22:36, Mitch Davis wrote:
> On Wed, Oct 8, 2008 at 12:02 PM, Mike Frysinger wrote:
>> On Tue, Oct 7, 2008 at 20:27, Mitch Davis wrote:
>>> fec.c in mtd-utils uses bcopy(), so mtd-utils doesn't compile for me.
>>> I'd like to fix this.
>>>
>>>  - Should I rewrite fec.c so it uses memcpy instead?
>>>  - Should I just add #define NEED_BCOPY to fec.c?
>>>  - Should I leave fec.c unchanged and add -DNEED_BCOPY to the Makefile
>>> (which would be passed to every compile?)
>>
>> a simple sed can fix the code as the only difference between bcopy()
>> and memcpy() is the argument order.  ifdef's are pointless/ugly in
>> this case.
>
> I agree.  I've attached a diff that makes this change.
>
> It compiles with no warnings, but I have no way of testing it.  Any
> suggestions what to do next?

use `git diff` to generate a diff instead of posting the entire file
as an attachment.  really you should use git to send the patch, but if
that's too much for you, just post the diff.
-mike



More information about the linux-mtd mailing list