[U-Boot-Users] [patch] fix lib_generic version of strswab()

Andrew Dyer amdyer at gmail.com
Wed Feb 9 00:28:49 CET 2005


This patch changes the behavior of strswab() to end the byte swapping
when either of the two candidate bytes is null.  The old behavior was
to only abort when the second byte was null.
It looks like this is only used for little endian machines running
with CONFIG_IDE.

I noticed this because the ide serial number was not printing out -
the reason was strswab() was running past the end of the previous
string in memory and swapping a null into the first byte of my serial
number string.

-- 
Hardware, n.:
        The parts of a computer system that can be kicked.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uboot-strswab-patch.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20050208/b5e58a1c/attachment.txt 


More information about the U-Boot mailing list