It appears that recent changes to remote protocol handling have exposed a latent bug in remote fileio. Two of the remote fileio calls start reading target memory before completely processing the fileio response packet. Reading remote memory overwrites that buffer. This patch reorders the stat and rename calls to not do that. Tested on an m68k-elf target. ok? nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk