Skip to contentSkip to conversation

fix lib_generic version of strswab()

PATCH New Andrew Dyer 2 participants 2 messages Feb 8, 2005 – Sep 25, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix lib_generic version of strswab()

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.

Signature · 6 lines
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 
#1 lore raw

PATCH 1/1 fix lib_generic version of strswab()

Quoted 2 lines · In message <[email protected]> you wrote:

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

Added, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q: What do you get when you cross an ethernet with an income statement?
A: A local area networth.